1 | #!/bin/sh |
---|
2 | |
---|
3 | ## trying out different data param types |
---|
4 | |
---|
5 | # alice_rt1 |
---|
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-alice([keyid:$alice_keyid])" |
---|
22 | friendof_marchhare="friendOf([keyid:$marchhare_keyid])" |
---|
23 | guestof_marchhare="guestOf([keyid:$marchhare_keyid])" |
---|
24 | |
---|
25 | about_party="about([keyid:$tea_keyid],[time:20101010T],[boolean:true],[integer:4],[float:-200.0],[float:8],[time:20120205T182930],[string:'guest'],[urn:'file://usr/local/party/~teaparty'])" |
---|
26 | |
---|
27 | about_other_party="about_other_party([keyid:$tea_keyid],[?],[integer:99],[time:?AAA],[integer:?BBB],[boolean:true],[integer:?])" |
---|
28 | |
---|
29 | about_time="about_time([time:20201101T])" |
---|
30 | about_another_time="about_another_time([time:20201101T182930])" |
---|
31 | about_key="about_key([keyid:$tea_keyid])" |
---|
32 | about_boolean="about_boolean([boolean:true])" |
---|
33 | about_integer="about_integer([integer:4])" |
---|
34 | about_another_integer="about_another_integer([integer:-7])" |
---|
35 | about_float="about_float([float:-200.0])" |
---|
36 | about_another_float="about_another_float([float:8])" |
---|
37 | about_third_float="about_another_float([float:0.22])" |
---|
38 | about_urn="about_urn([urn:'file://user/local/party/~sillyparty'])" |
---|
39 | about_string="about_string([string:'a confused party'])" |
---|
40 | about_string2="about_string([string:'a mangled \'string\''])" |
---|
41 | |
---|
42 | |
---|
43 | #[keyid:Party].role:about([keyid:tea],[time:201010],[string:'guest list'],[boolean:true],[integer:4]) <- [keyid:Party].role:guestOf([keyid:MarchHare]) |
---|
44 | #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" |
---|
45 | creddy --attribute \ |
---|
46 | --issuer Party_ID.pem --key Party_private.pem --role "$about_party" \ |
---|
47 | --subject-cert Party_ID.pem --subject-role "$guestof_marchhare" \ |
---|
48 | --out party_about_party__guestof_marchhare_attr.der |
---|
49 | #echo " " |
---|
50 | #echo "double checking with creddy --roles -certs party_about_party__guestof_marchhare_attr.der" |
---|
51 | #creddy --roles --cert party_about_party__guestof_marchhare_attr.der |
---|
52 | |
---|
53 | #[keyid:Party].role:about_other_party([keyid:$tea_keyid],[time:?],[boolean:true]) <- [keyid:MarchHare] |
---|
54 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_other_party\" --subject-cert MarchHare_ID.pem --out party_about_other_party__marchhare_attr.der" |
---|
55 | creddy --attribute \ |
---|
56 | --issuer Party_ID.pem --key Party_private.pem --role "$about_other_party" \ |
---|
57 | --subject-cert MarchHare_ID.pem \ |
---|
58 | --out party_about_other_party__marchhare_attr.der |
---|
59 | |
---|
60 | #[keyid:Party].role:about_string([string:'a confused party']) <- [keyid:MarchHare] |
---|
61 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_string\" --subject-cert MarchHare_ID.pem --out party_about_string__marchhare_attr.der" |
---|
62 | creddy --attribute \ |
---|
63 | --issuer Party_ID.pem --key Party_private.pem --role "$about_string" \ |
---|
64 | --subject-cert MarchHare_ID.pem \ |
---|
65 | --out party_about_string__marchhare_attr.der |
---|
66 | |
---|
67 | #[keyid:Party].role:about_string2([string:'a mangled \'string\'']) <- [keyid:MarchHare] |
---|
68 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_string2\" --subject-cert MarchHare_ID.pem --out party_about_string2__marchhare_attr.der" |
---|
69 | creddy --attribute \ |
---|
70 | --issuer Party_ID.pem --key Party_private.pem --role "$about_string2" \ |
---|
71 | --subject-cert MarchHare_ID.pem \ |
---|
72 | --out party_about_string2__marchhare_attr.der |
---|
73 | |
---|
74 | #[keyid:Party].role:about_urn([urn:'file://user/local/party/~sillyparty']) <- [keyid:MarchHare] |
---|
75 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_urn\" --subject-cert MarchHare_ID.pem --out party_about_urn__marchhare_attr.der" |
---|
76 | creddy --attribute \ |
---|
77 | --issuer Party_ID.pem --key Party_private.pem --role "$about_urn" \ |
---|
78 | --subject-cert MarchHare_ID.pem \ |
---|
79 | --out party_about_urn__marchhare_attr.der |
---|
80 | |
---|
81 | #[keyid:Party].role:about_third_float([float:0.22]) <- [keyid:MarchHare] |
---|
82 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_third_float\" --subject-cert MarchHare_ID.pem --out party_about_third_float__marchhare_attr.der" |
---|
83 | creddy --attribute \ |
---|
84 | --issuer Party_ID.pem --key Party_private.pem --role "$about_third_float" \ |
---|
85 | --subject-cert MarchHare_ID.pem \ |
---|
86 | --out party_about_third_float__marchhare_attr.der |
---|
87 | |
---|
88 | #[keyid:Party].role:about_another_float([float:8]) <- [keyid:MarchHare] |
---|
89 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_another_float\" --subject-cert MarchHare_ID.pem --out party_about_another_float__marchhare_attr.der" |
---|
90 | creddy --attribute \ |
---|
91 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_float" \ |
---|
92 | --subject-cert MarchHare_ID.pem \ |
---|
93 | --out party_about_another_float__marchhare_attr.der |
---|
94 | |
---|
95 | #[keyid:Party].role:about_float([float:-200.0]) <- [keyid:MarchHare] |
---|
96 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_float\" --subject-cert MarchHare_ID.pem --out party_about_float__marchhare_attr.der" |
---|
97 | creddy --attribute \ |
---|
98 | --issuer Party_ID.pem --key Party_private.pem --role "$about_float" \ |
---|
99 | --subject-cert MarchHare_ID.pem \ |
---|
100 | --out party_about_float__marchhare_attr.der |
---|
101 | |
---|
102 | #[keyid:Party].role:about_another_integer([integer:-7]) <- [keyid:MarchHare] |
---|
103 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_another_integer\" --subject-cert MarchHare_ID.pem --out party_about_another_integer__marchhare_attr.der" |
---|
104 | creddy --attribute \ |
---|
105 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_integer" \ |
---|
106 | --subject-cert MarchHare_ID.pem \ |
---|
107 | --out party_about_another_nteger__marchhare_attr.der |
---|
108 | |
---|
109 | #[keyid:Party].role:about_integer([integer:4]) <- [keyid:MarchHare] |
---|
110 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_integer\" --subject-cert MarchHare_ID.pem --out party_about_integer__marchhare_attr.der" |
---|
111 | creddy --attribute \ |
---|
112 | --issuer Party_ID.pem --key Party_private.pem --role "$about_integer" \ |
---|
113 | --subject-cert MarchHare_ID.pem \ |
---|
114 | --out party_about_integer__marchhare_attr.der |
---|
115 | |
---|
116 | #[keyid:Party].role:about_boolean([boolean:true]) <- [keyid:MarchHare] |
---|
117 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_boolean\" --subject-cert MarchHare_ID.pem --out party_about_boolean__marchhare_attr.der" |
---|
118 | creddy --attribute \ |
---|
119 | --issuer Party_ID.pem --key Party_private.pem --role "$about_boolean" \ |
---|
120 | --subject-cert MarchHare_ID.pem \ |
---|
121 | --out party_about_boolean__marchhare_attr.der |
---|
122 | |
---|
123 | #[keyid:Party].role:about_key([keyid:$tea_keyid]) <- [keyid:MarchHare] |
---|
124 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_key\" --subject-cert MarchHare_ID.pem --out party_about_key__marchhare_attr.der" |
---|
125 | creddy --attribute \ |
---|
126 | --issuer Party_ID.pem --key Party_private.pem --role "$about_key" \ |
---|
127 | --subject-cert MarchHare_ID.pem \ |
---|
128 | --out party_about_key__marchhare_attr.der |
---|
129 | |
---|
130 | #[keyid:Party].role:about_another_time([time:20201101T182930]) <- [keyid:MarchHare] |
---|
131 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_another_time\" --subject-cert MarchHare_ID.pem --out party_about_another_time__marchhare_attr.der" |
---|
132 | creddy --attribute \ |
---|
133 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_time" \ |
---|
134 | --subject-cert MarchHare_ID.pem \ |
---|
135 | --out party_about_another_time__marchhare_attr.der |
---|
136 | |
---|
137 | #[keyid:Party].role:about_time([time:20201101T]) <- [keyid:MarchHare] |
---|
138 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_time\" --subject-cert MarchHare_ID.pem --out party_about_time__marchhare_attr.der" |
---|
139 | creddy --attribute \ |
---|
140 | --issuer Party_ID.pem --key Party_private.pem --role "$about_time" \ |
---|
141 | --subject-cert MarchHare_ID.pem \ |
---|
142 | --out party_about_time__marchhare_attr.der |
---|
143 | |
---|
144 | #[keyid:Party].role:guestof([principal:?V]) <- [keyid:Party].role:friendOf([principal:?V]) |
---|
145 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role 'guestOf([principal:?V])' --subject-cert Party_ID.pem --subject-role 'friendOf([principal:?V])' --out party_guestof_qV__party_friendof_qV_attr.der" |
---|
146 | creddy --attribute \ |
---|
147 | --issuer Party_ID.pem --key Party_private.pem --role 'guestOf([principal:?V])' \ |
---|
148 | --subject-cert Party_ID.pem --subject-role 'friendOf([principal:?V])' \ |
---|
149 | --out party_guestof_qV__party_friendof_qV_attr.der |
---|
150 | |
---|
151 | #[keyid:Party].role:guests <- [keyid:Party].role:friendOf([keyid:MarchHare]) |
---|
152 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role guests --subject-cert Party_ID.pem --subject-role \"$friendof_marchhare\" --out party_guests__party_friendof_marchhare_attr.der" |
---|
153 | creddy --attribute \ |
---|
154 | --issuer Party_ID.pem --key Party_private.pem --role guests \ |
---|
155 | --subject-cert Party_ID.pem --subject-role "$friendof_marchhare" \ |
---|
156 | --out party_guests__party_friendof_marchhare_attr.der |
---|
157 | |
---|
158 | #[keyid:Party].role:friendOf([keyid:MarchHare]) <- [keyid:Dormouse] |
---|
159 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$friendof_marchhare\" --subject-cert Dormouse_ID.pem --out party_friendof_marchhare__dormouse_attr.der" |
---|
160 | creddy --attribute \ |
---|
161 | --issuer Party_ID.pem --key Party_private.pem --role "$friendof_marchhare" \ |
---|
162 | --subject-cert Dormouse_ID.pem \ |
---|
163 | --out party_friendof_marchhare__dormouse_attr.der |
---|
164 | |
---|
165 | #[keyid:Party].role:friendOf([keyid:Alice]) <- [keyid:Hatter] |
---|
166 | #echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$friendof_alice\" --subject-cert Hatter_ID.pem --out party_friendof_alice__hatter_attr.der" |
---|
167 | creddy --attribute \ |
---|
168 | --issuer Party_ID.pem --key Party_private.pem --role "$friendof_alice" \ |
---|
169 | --subject-cert Hatter_ID.pem \ |
---|
170 | --out party_friendof_alice__hatter_attr.der |
---|
171 | |
---|
172 | |
---|