source: examples/alice_rt1_typed/README @ a5e8390

mei_rt2mei_rt2_fix_1meiyap-rt1rt2
Last change on this file since a5e8390 was a9494ad, checked in by Mei <mei@…>, 13 years ago

1) update credential string's storage from plain to base64 encoded

in creddy and also in yap db

2) add alice_rt1_typed example directory (complex params)

  • Property mode set to 100755
File size: 6.2 KB
Line 
1#!/bin/sh
2
3## trying out different data param types
4
5rm -rf *.der *.pem
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([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 list'],[urn:'file://usr/local/party/~teaparty'])"
26
27about_time="about_time([time:20201101T])"
28about_another_time="about_another_time([time:20201101T182930])"
29about_key="about_key([keyid:$tea_keyid])"
30about_boolean="about_boolean([boolean:true])"
31about_integer="about_integer([integer:4])"
32about_another_integer="about_another_integer([integer:-7])"
33about_float="about_float([float:-200.0])"
34about_another_float="about_another_float([float:8])"
35about_third_float="about_another_float([float:0.22])"
36about_urn="about_urn([urn:'file://user/local/party/~sillyparty'])"
37about_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])
41echo "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
43creddy --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]
50creddy --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]
56creddy --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]
62creddy --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]
68creddy --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]
74creddy --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]
80creddy --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]
86creddy --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]
92creddy --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]
98creddy --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]
104creddy --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]
110creddy --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])
116creddy --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])
122creddy --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]
129creddy --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]
135creddy --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
Note: See TracBrowser for help on using the repository browser.