1 | #!/bin/sh |
---|
2 | |
---|
3 | ## trying out different data param types |
---|
4 | |
---|
5 | #rm -rf *.der *.pem |
---|
6 | |
---|
7 | #creddy --generate --cn Alice |
---|
8 | #creddy --generate --cn Hatter |
---|
9 | #creddy --generate --cn MarchHare |
---|
10 | #creddy --generate --cn Dormouse |
---|
11 | #creddy --generate --cn Tea |
---|
12 | #creddy --generate --cn Party |
---|
13 | |
---|
14 | alice_keyid=`creddy --keyid --cert Alice_ID.pem` |
---|
15 | party_keyid=`creddy --keyid --cert Party_ID.pem` |
---|
16 | tea_keyid=`creddy --keyid --cert Tea_ID.pem` |
---|
17 | hatter_keyid=`creddy --keyid --cert Hatter_ID.pem` |
---|
18 | marchhare_keyid=`creddy --keyid --cert MarchHare_ID.pem` |
---|
19 | dormouse_keyid=`creddy --keyid --cert Dormouse_ID.pem` |
---|
20 | |
---|
21 | friendof_alice="friendOf([keyid:$alice_keyid])" |
---|
22 | friendof_marchhare="friendOf([keyid:$marchhare_keyid])" |
---|
23 | guestof_marchhare="guestOf([keyid:$marchhare_keyid])" |
---|
24 | |
---|
25 | #okay, about_party="about([time:20201101T],[time:20110614T])" |
---|
26 | #okay, about_party="about([keyid:$tea_keyid],[time:20101010T])" |
---|
27 | #bad, about_party="about([keyid:$tea_keyid],[keyid:$alice_keyid])" |
---|
28 | #bad, about_party="about([keyid:$tea_keyid],[time:20100203T],[keyid:$alice_keyid])" |
---|
29 | #about_party="about([keyid:$tea_keyid],[keyid:$alice_keyid],[time:20101010T])" |
---|
30 | about_party="about([keyid:$tea_keyid],[time:20101010T],[boolean:true],[integer:4],[float:-200.0],[float:8],[time:20120205T182930],[string:'guest list'],[urn:'file://usr/local/party/~teaparty'])" |
---|
31 | |
---|
32 | #[keyid:Party].role:about([keyid:tea],[time:201010],[string:'guest list'],[boolean:true],[integer:4]) <- [keyid:Party].role:guestOf([keyid:MarchHare]) |
---|
33 | echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_party\" --subject-cert Party_ID.pem --subject-role \"$guestof_marchhare\" --out party_about_party__guestof_marchhare_attr.der" |
---|
34 | /home/mei/Deter/abac/creddy/creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role "$about_party" --subject-cert Party_ID.pem --subject-role "$guestof_marchhare" --out party_about_party__guestof_marchhare_attr.der |
---|
35 | |
---|
36 | echo " " |
---|
37 | echo "double checking with creddy --roles -certs party_about_party__guestof_marchhare_attr.der" |
---|
38 | creddy --roles --cert party_about_party__guestof_marchhare_attr.der |
---|
39 | |
---|
40 | |
---|
41 | |
---|