source: examples/creddy_prover_tests/alice_rt1/README @ f89b991

mei_rt2
Last change on this file since f89b991 was f824a9e, checked in by Mei <mei@…>, 12 years ago

1) add more doc to python_tests

  • Property mode set to 100755
File size: 10.1 KB
Line 
1#!/bin/sh
2
3## trying out different data param types
4
5# alice_rt1
6
7creddy --generate --cn Alice
8creddy --generate --cn Hatter
9creddy --generate --cn MarchHare
10creddy --generate --cn Dormouse
11creddy --generate --cn Tea
12creddy --generate --cn Party
13
14alice_keyid=`creddy --keyid --cert Alice_ID.pem`
15party_keyid=`creddy --keyid --cert Party_ID.pem`
16tea_keyid=`creddy --keyid --cert Tea_ID.pem`
17hatter_keyid=`creddy --keyid --cert Hatter_ID.pem`
18marchhare_keyid=`creddy --keyid --cert MarchHare_ID.pem`
19dormouse_keyid=`creddy --keyid --cert Dormouse_ID.pem`
20
21friendof_alice="friendOf-alice([keyid:$alice_keyid])"
22friendof_marchhare="friendOf([keyid:$marchhare_keyid])"
23guestof_marchhare="guestOf([keyid:$marchhare_keyid])"
24
25about_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
27about_other_party="about_other_party([keyid:$tea_keyid],[?],[integer:99],[time:?AAA],[integer:?BBB],[boolean:true],[integer:?])"
28
29about_time="about_time([time:20201101T])"
30about_another_time="about_another_time([time:20201101T182930])"
31about_key="about_key([keyid:$tea_keyid])"
32about_boolean="about_boolean([boolean:true])"
33about_integer="about_integer([integer:4])"
34about_another_integer="about_another_integer([integer:-7])"
35about_float="about_float([float:-200.0])"
36about_another_float="about_another_float([float:8])"
37about_third_float="about_another_float([float:0.22])"
38about_urn="about_urn([urn:'file://user/local/party/~sillyparty'])"
39about_string="about_string([string:'a confused party'])"
40about_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"
45creddy --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"
55creddy --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"
62creddy --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"
69creddy --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"
76creddy --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"
83creddy --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"
90creddy --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"
97creddy --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"
104creddy --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"
111creddy --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"
118creddy --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"
125creddy --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"
132creddy --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"
139creddy --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"
146creddy --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"
153creddy --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"
160creddy --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"
167creddy --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
Note: See TracBrowser for help on using the repository browser.