source: examples/alumni3_rt1_typed/README @ acf3ff9

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

1) add alumni3_rt1_typed

(multiple static target range constraint - string & int types)

  • Property mode set to 100755
File size: 2.7 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] (no)
6# [keyid:stateU].role:foundingAlumni <-?- [keyid:Joe] (no)
7
8creddy --generate --cn StateU
9creddy --generate --cn Bob
10creddy --generate --cn Mark
11creddy --generate --cn Joe
12creddy --generate --cn Maryann
13creddy --generate --cn Jan
14
15stateU_keyid=`creddy --keyid --cert StateU_ID.pem`
16
17bob_keyid=`creddy --keyid --cert Bob_ID.pem`
18mark_keyid=`creddy --keyid --cert Mark_ID.pem`
19joe_keyid=`creddy --keyid --cert Joe_ID.pem`
20maryann_keyid=`creddy --keyid --cert Maryann_ID.pem`
21jan_keyid=`creddy --keyid --cert Jan_ID.pem`
22
23diploma_q_qY="diploma([string:?D:['mathmatics','psychology']], [integer:?Year:[1960,1961,1963]])"
24
25diploma_m="diploma([string:'mathmatics'],[integer:1961])"
26diploma_mm="diploma([string:'mathmatics'],[integer:1965])"
27diploma_z="diploma([string:'zoology'],[integer:1961])"
28diploma_p="diploma([string:'psychology'],[integer:1962])"
29diploma_pp="diploma([string:'psychology'],[integer:1960])"
30
31# [keyid:stateU].role:foundingAlumni
32#                   <- [keyid:stateU].role:diploma([string:?D:['mathmatics','psychology']], [integer:?Year:[1960,1961,1963]])
33creddy --attribute \
34       --issuer StateU_ID.pem --key StateU_private.pem --role "foundingAlumni" \
35       --subject-cert StateU_ID.pem --subject-role "$diploma_q_qY" \
36       --out StateU_foundingAlumni__stateU_diploma_q_qY_attr.der
37
38# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1961]) <- [keyid:bob]
39creddy --attribute \
40        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_m" \
41        --subject-cert Bob_ID.pem \
42        --out StateU_diploma_m__Bob_attr.der
43
44# [keyid:stateU].role:diploma([string:'mathmatics'],[integer:1965]) <- [keyid:mark]
45creddy --attribute \
46        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_mm" \
47        --subject-cert Mark_ID.pem \
48        --out StateU_diploma_mm__Mark_attr.der
49
50# [keyid:stateU].role:diploma([string:'zoology'],[integer:1961]) <- [keyid:joe]
51creddy --attribute \
52        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_z" \
53        --subject-cert Joe_ID.pem \
54        --out StateU_diploma_z__Joe_attr.der
55
56# [keyid:stateU].role:diploma([string:'psychology'],[integer:1962]) <- [keyid:maryann]
57creddy --attribute \
58        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_p" \
59        --subject-cert Maryann_ID.pem \
60        --out StateU_diploma_p__Maryann_attr.der
61
62# [keyid:stateU].role:diploma([string:'psychology'],[integer:1960]) <- [keyid:jan]
63creddy --attribute \
64        --issuer StateU_ID.pem --key StateU_private.pem --role "$diploma_pp" \
65        --subject-cert Jan_ID.pem \
66        --out StateU_diploma_pp__Jan_attr.der
67
Note: See TracBrowser for help on using the repository browser.