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