[10e1588] | 1 | #!/bin/sh |
---|
| 2 | |
---|
| 3 | rm -rf *.der *.pem |
---|
| 4 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Bob] (yes) |
---|
| 5 | # [keyid:stateU].role:foundingAlumni <-?- [keyid:Maryann] (yes) |
---|
| 6 | |
---|
| 7 | creddy --generate --cn StateU |
---|
| 8 | creddy --generate --cn Bob |
---|
| 9 | creddy --generate --cn Maryann |
---|
| 10 | creddy --generate --cn Joe |
---|
| 11 | |
---|
| 12 | stateU_keyid=`creddy --keyid --cert StateU_ID.pem` |
---|
| 13 | bob_keyid=`creddy --keyid --cert Bob_ID.pem` |
---|
| 14 | maryann_keyid=`creddy --keyid --cert Maryann_ID.pem` |
---|
| 15 | joe_keyid=`creddy --keyid --cert Joe_ID.pem` |
---|
| 16 | |
---|
| 17 | diploma_q_qY="diploma(?, [integer:?Year[1955..1958])" |
---|
| 18 | |
---|
| 19 | diploma_m="diploma([string:'mathmatics'],[integer:1960])" |
---|
| 20 | diploma_z="diploma([string:'zoology'],[integer:1955])" |
---|
| 21 | diploma_p="diploma([string:'psychology'],[integer:1956])" |
---|
| 22 | |
---|
| 23 | # [keyid:stateU].role:foundingAlumni |
---|
| 24 | # <- [keyid:stateU].role:diploma(?, [integer:?Year[1955..1958]) |
---|
| 25 | creddy --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] |
---|
| 31 | creddy --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] |
---|
| 37 | creddy --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] |
---|
| 43 | creddy --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 | # |
---|