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 | 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'])" |
---|
26 | |
---|
27 | about_time="about_time([time:20201101T])" |
---|
28 | about_another_time="about_another_time([time:20201101T182930])" |
---|
29 | about_key="about_key([keyid:$tea_keyid])" |
---|
30 | about_boolean="about_boolean([boolean:true])" |
---|
31 | about_integer="about_integer([integer:4])" |
---|
32 | about_another_integer="about_another_integer([integer:-7])" |
---|
33 | about_float="about_float([float:-200.0])" |
---|
34 | about_another_float="about_another_float([float:8])" |
---|
35 | about_third_float="about_another_float([float:0.22])" |
---|
36 | about_urn="about_urn([urn:'file://user/local/party/~sillyparty'])" |
---|
37 | about_string="about_string([string:'a confused party'])" |
---|
38 | |
---|
39 | |
---|
40 | #[keyid:Party].role:about([keyid:tea],[time:201010],[string:'guest list'],[boolean:true],[integer:4]) <- [keyid:Party].role:guestOf([keyid:MarchHare]) |
---|
41 | 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" |
---|
42 | |
---|
43 | 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 |
---|
44 | |
---|
45 | #echo " " |
---|
46 | #echo "double checking with creddy --roles -certs party_about_party__guestof_marchhare_attr.der" |
---|
47 | #creddy --roles --cert party_about_party__guestof_marchhare_attr.der |
---|
48 | |
---|
49 | #[keyid:Party].role:about_string([string:'a confused party']) <- [keyid:MarchHare] |
---|
50 | creddy --attribute \ |
---|
51 | --issuer Party_ID.pem --key Party_private.pem --role "$about_string" \ |
---|
52 | --subject-cert MarchHare_ID.pem \ |
---|
53 | --out party_about_string__marchhare_attr.der |
---|
54 | |
---|
55 | #[keyid:Party].role:about_urn([urn:'file://user/local/party/~sillyparty']) <- [keyid:MarchHare] |
---|
56 | creddy --attribute \ |
---|
57 | --issuer Party_ID.pem --key Party_private.pem --role "$about_urn" \ |
---|
58 | --subject-cert MarchHare_ID.pem \ |
---|
59 | --out party_about_urn__marchhare_attr.der |
---|
60 | |
---|
61 | #[keyid:Party].role:about_third_float([float:0.22]) <- [keyid:MarchHare] |
---|
62 | creddy --attribute \ |
---|
63 | --issuer Party_ID.pem --key Party_private.pem --role "$about_third_float" \ |
---|
64 | --subject-cert MarchHare_ID.pem \ |
---|
65 | --out party_about_third_float__marchhare_attr.der |
---|
66 | |
---|
67 | #[keyid:Party].role:about_another_float([float:8]) <- [keyid:MarchHare] |
---|
68 | creddy --attribute \ |
---|
69 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_float" \ |
---|
70 | --subject-cert MarchHare_ID.pem \ |
---|
71 | --out party_about_another_float__marchhare_attr.der |
---|
72 | |
---|
73 | #[keyid:Party].role:about_float([float:-200.0]) <- [keyid:MarchHare] |
---|
74 | creddy --attribute \ |
---|
75 | --issuer Party_ID.pem --key Party_private.pem --role "$about_float" \ |
---|
76 | --subject-cert MarchHare_ID.pem \ |
---|
77 | --out party_about_float__marchhare_attr.der |
---|
78 | |
---|
79 | #[keyid:Party].role:about_another_integer([integer:-7]) <- [keyid:MarchHare] |
---|
80 | creddy --attribute \ |
---|
81 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_integer" \ |
---|
82 | --subject-cert MarchHare_ID.pem \ |
---|
83 | --out party_about_another_nteger__marchhare_attr.der |
---|
84 | |
---|
85 | #[keyid:Party].role:about_integer([integer:4]) <- [keyid:MarchHare] |
---|
86 | creddy --attribute \ |
---|
87 | --issuer Party_ID.pem --key Party_private.pem --role "$about_integer" \ |
---|
88 | --subject-cert MarchHare_ID.pem \ |
---|
89 | --out party_about_integer__marchhare_attr.der |
---|
90 | |
---|
91 | #[keyid:Party].role:about_boolean([boolean:true]) <- [keyid:MarchHare] |
---|
92 | creddy --attribute \ |
---|
93 | --issuer Party_ID.pem --key Party_private.pem --role "$about_boolean" \ |
---|
94 | --subject-cert MarchHare_ID.pem \ |
---|
95 | --out party_about_boolean__marchhare_attr.der |
---|
96 | |
---|
97 | #[keyid:Party].role:about_key([keyid:$tea_keyid]) <- [keyid:MarchHare] |
---|
98 | creddy --attribute \ |
---|
99 | --issuer Party_ID.pem --key Party_private.pem --role "$about_key" \ |
---|
100 | --subject-cert MarchHare_ID.pem \ |
---|
101 | --out party_about_key__marchhare_attr.der |
---|
102 | |
---|
103 | #[keyid:Party].role:about_another_time([time:20201101T182930]) <- [keyid:MarchHare] |
---|
104 | creddy --attribute \ |
---|
105 | --issuer Party_ID.pem --key Party_private.pem --role "$about_another_time" \ |
---|
106 | --subject-cert MarchHare_ID.pem \ |
---|
107 | --out party_about_another_time__marchhare_attr.der |
---|
108 | |
---|
109 | #[keyid:Party].role:about_time([time:20201101T]) <- [keyid:MarchHare] |
---|
110 | creddy --attribute \ |
---|
111 | --issuer Party_ID.pem --key Party_private.pem --role "$about_time" \ |
---|
112 | --subject-cert MarchHare_ID.pem \ |
---|
113 | --out party_about_time__marchhare_attr.der |
---|
114 | |
---|
115 | #[keyid:Party].role:guestof([principal:?V]) <- [keyid:Party].role:friendOf([principal:?V]) |
---|
116 | creddy --attribute \ |
---|
117 | --issuer Party_ID.pem --key Party_private.pem --role 'guestOf([principal:?V])' \ |
---|
118 | --subject-cert Party_ID.pem --subject-role 'friendOf([principal:?V])' \ |
---|
119 | --out party_guestof_qV__party_friendof_qV_attr.der |
---|
120 | |
---|
121 | #[keyid:Party].role:guests <- [keyid:Party].role:friendOf([keyid:MarchHare]) |
---|
122 | creddy --attribute \ |
---|
123 | --issuer Party_ID.pem --key Party_private.pem --role guests \ |
---|
124 | --subject-cert Party_ID.pem --subject-role $friendof_marchhare \ |
---|
125 | --out party_guests__party_friendof_marchhare_attr.der |
---|
126 | |
---|
127 | |
---|
128 | #[keyid:Party].role:friendOf([keyid:MarchHare]) <- [keyid:Dormouse] |
---|
129 | creddy --attribute \ |
---|
130 | --issuer Party_ID.pem --key Party_private.pem --role $friendof_marchhare \ |
---|
131 | --subject-cert Dormouse_ID.pem \ |
---|
132 | --out party_friendof_marchhare__dormouse_attr.der |
---|
133 | |
---|
134 | #[keyid:Party].role:friendOf([keyid:Alice]) <- [keyid:Hatter] |
---|
135 | creddy --attribute \ |
---|
136 | --issuer Party_ID.pem --key Party_private.pem --role $friendof_alice \ |
---|
137 | --subject-cert Hatter_ID.pem \ |
---|
138 | --out party_friendof_alice__hatter_attr.der |
---|
139 | |
---|
140 | |
---|