1 | #!/bin/sh |
---|
2 | |
---|
3 | rm -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 | |
---|
8 | creddy --generate --cn StateU |
---|
9 | creddy --generate --cn Bob |
---|
10 | creddy --generate --cn Mark |
---|
11 | creddy --generate --cn Joe |
---|
12 | creddy --generate --cn Maryann |
---|
13 | creddy --generate --cn Jan |
---|
14 | |
---|
15 | stateU_keyid=`creddy --keyid --cert StateU_ID.pem` |
---|
16 | |
---|
17 | bob_keyid=`creddy --keyid --cert Bob_ID.pem` |
---|
18 | mark_keyid=`creddy --keyid --cert Mark_ID.pem` |
---|
19 | joe_keyid=`creddy --keyid --cert Joe_ID.pem` |
---|
20 | maryann_keyid=`creddy --keyid --cert Maryann_ID.pem` |
---|
21 | jan_keyid=`creddy --keyid --cert Jan_ID.pem` |
---|
22 | |
---|
23 | diploma_q_qY="diploma([string:?D:['mathmatics','psychology']], [integer:?Year:[1960,1961,1963]])" |
---|
24 | |
---|
25 | diploma_m="diploma([string:'mathmatics'],[integer:1961])" |
---|
26 | diploma_mm="diploma([string:'mathmatics'],[integer:1965])" |
---|
27 | diploma_z="diploma([string:'zoology'],[integer:1961])" |
---|
28 | diploma_p="diploma([string:'psychology'],[integer:1962])" |
---|
29 | diploma_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]]) |
---|
33 | creddy --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] |
---|
39 | creddy --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] |
---|
45 | creddy --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] |
---|
51 | creddy --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] |
---|
57 | creddy --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] |
---|
63 | creddy --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 | |
---|