source: examples/alumni_rt1_typed/README @ 34ea038

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since 34ea038 was da5afdf, checked in by Mei <mei@…>, 13 years ago

1) add static contraint

(limited to integer at this time)

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#!/bin/sh
2
3rm -rf *.der *.pem
4# [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes)
5# [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (yes)
6
7creddy --generate --cn StateU
8creddy --generate --cn Bob
9creddy --generate --cn Maryann
10creddy --generate --cn Joe
11
12stateU_keyid=`creddy --keyid --cert StateU_ID.pem`
13bob_keyid=`creddy --keyid --cert Bob_ID.pem`
14maryann_keyid=`creddy --keyid --cert Maryann_ID.pem`
15joe_keyid=`creddy --keyid --cert Joe_ID.pem`
16
17diploma_q_qY="diploma([?], [integer:?Year:[1955..1958]])"
18
19diploma_m="diploma([string:'mathmatics'],[integer:1960])"
20diploma_z="diploma([string:'zoology'],[integer:1955])"
21diploma_p="diploma([string:'psychology'],[integer:1956])"
22
23# [keyid:stateU].role:foundingAlumni
24#                   <- [keyid:stateU].role:diploma([?], [integer:?Year:[1955..1958]])
25creddy --attribute \
26       --issuer StateU_ID.pem --key StateU_private.pem --role "foundingAlumni" \
27       --subject-cert StateU_ID.pem --subject-role "$diploma_q_qY" \
28       --out StateU_foundingAlumni__stateU_diploma_q_qY_attr.der
29
30# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1960]) <- [keyid:bob]
31creddy --attribute \
32        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_m" \
33        --subject-cert Bob_ID.pem \
34        --out StateU_diploma_m__Bob_attr.der
35
36# [keyid:stateU].role:diploma([string:'zoology'],[integer:1955]) <- [keyid:joe]
37creddy --attribute \
38        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_z" \
39        --subject-cert Joe_ID.pem \
40        --out StateU_diploma_m__Joe_attr.der
41
42# [keyid:stateU].role:diploma([string:'psychology'],[integer:1956]) <- [keyid:maryann]
43creddy --attribute \
44        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_p" \
45        --subject-cert Maryann_ID.pem \
46        --out StateU_diploma_m__Maryann_attr.der
47
48
49#####################################################################
50# stateU.foundingAlumni <- stateU.diploma(?, ?Year:[1955..1958])
51# [keyid:stateU].role:foundingAlumni
52#                <- [keyid:stateU].role:diploma([?], [integer:?Year:[1955..1958]])
53#
54# stateU.diploma(mathmatics,1960)<-bob
55# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1960]) <- [keyid:bob]
56#
57# stateU.diploma(zoology,1955)<-joe
58# [keyid:stateU].role:diploma([string:'zoology'],[integer:1955]) <- [keyid:joe]
59#
60# stateU.diploma(psychology,1956)<-maryann
61# [keyid:stateU].role:diploma([string:'psychology'],[integer:1956]) <- [keyid:maryann]
62#
63# query,
64# stateU.foundingAlumni<-?-bob  bad
65# [keyid:stateU].role:foundingAlumni <- [keyid:bob]
66#
67# stateU.foundingAlumni<-?-maryann  good
68# [keyid:stateU].role:foundingAlumni <- [keyid:maryann]
69#
Note: See TracBrowser for help on using the repository browser.