1 | #!/bin/sh |
---|
2 | |
---|
3 | rm -rf *.der *.pem |
---|
4 | |
---|
5 | # mary.what2eat<-?-orange good |
---|
6 | # bob.what2eat<-?-orange bad |
---|
7 | # ralphs.fruitprice(1.50)<-?-apple good |
---|
8 | |
---|
9 | creddy --generate --cn Mary |
---|
10 | creddy --generate --cn Bob |
---|
11 | creddy --generate --cn Ralphs |
---|
12 | |
---|
13 | mary_keyid=`creddy --keyid --cert Mary_ID.pem` |
---|
14 | bob_keyid=`creddy --keyid --cert Bob_ID.pem` |
---|
15 | ralphs_keyid=`creddy --keyid --cert Ralphs_ID.pem` |
---|
16 | |
---|
17 | fruitprice_qP="fruitprice([float:?P:[..2.00]])" |
---|
18 | fruitprice_qP_2="fruitprice([float:?P:[1.00..5.00]])" |
---|
19 | |
---|
20 | # [keyid:mary].oset:what2eat |
---|
21 | # <- [keyid:ralphs].oset:fruitprice([float:?P:[..2.00]]) |
---|
22 | creddy --attribute \ |
---|
23 | --issuer Mary_ID.pem --key Mary_private.pem --oset "what2eat" \ |
---|
24 | --subject-cert Ralphs_ID.pem --subject-oset "$fruitprice_qP" \ |
---|
25 | --out mary_what2eat__ralphs_fruitprice_qP_attr.der |
---|
26 | |
---|
27 | # [keyid:bob].oset:what2eat |
---|
28 | # <- [keyid:ralphs].oset:fruitprice([float:?P:[1.00..5.00]]) |
---|
29 | creddy --attribute \ |
---|
30 | --issuer Bob_ID.pem --key Bob_private.pem --oset "what2eat" \ |
---|
31 | --subject-cert Ralphs_ID.pem --subject-oset "$fruitprice_qP_2" \ |
---|
32 | --out bob_what2eat__ralphs_fruitprice_qP_2_attr.der |
---|
33 | |
---|
34 | # [keyid:ralphs].oset:fruitprice([float:1.50]) <- [string:'apple'] |
---|
35 | creddy --attribute \ |
---|
36 | --issuer Ralphs_ID.pem --key Ralphs_private.pem \ |
---|
37 | --oset "fruitprice([float:1.50])" \ |
---|
38 | --subject-obj "[string:'apple']" \ |
---|
39 | --out Ralphs_fruitprice__apple_attr.der |
---|
40 | |
---|
41 | # [keyid:ralphs].oset:fruitprice([float:2.50]) <- [string:'blueberry'] |
---|
42 | creddy --attribute \ |
---|
43 | --issuer Ralphs_ID.pem --key Ralphs_private.pem \ |
---|
44 | --oset "fruitprice([float:2.50])" \ |
---|
45 | --subject-obj "[string:'blueberry']" \ |
---|
46 | --out Ralphs_fruitprice__blueberry_attr.der |
---|
47 | |
---|
48 | # [keyid:ralphs].oset:fruitprice([float:0.50]) <- [string:'orange'] |
---|
49 | creddy --attribute \ |
---|
50 | --issuer Ralphs_ID.pem --key Ralphs_private.pem \ |
---|
51 | --oset "fruitprice([float:0.50])" \ |
---|
52 | --subject-obj "[string:'orange']" \ |
---|
53 | --out Ralphs_fruitprice__orange_attr.der |
---|
54 | |
---|
55 | ##################################################################### |
---|
56 | # mary.what2eat <- ralphs.fruitsprice(?P:[..2.00]) |
---|
57 | # [keyid:mary].oset:what2eat |
---|
58 | # <- [keyid:ralphs].oset:fruitprice([float:?P:[..2.00]]) |
---|
59 | # |
---|
60 | # bob.what2eat <- ralphs.fruitsprice(?P:[1.00..5.00]) |
---|
61 | # [keyid:bob].oset:what2eat |
---|
62 | # <- [keyid:ralphs].oset:fruitprice([float:?P:[1.00..5.00]]) |
---|
63 | # |
---|
64 | # ralphs.fruitprice(1.50)<-apple |
---|
65 | # [keyid:ralphs].oset:fruitprice([float:1.50]) <- [string:'apple'] |
---|
66 | # |
---|
67 | # ralphs.fruitprice(2.50)<-blueberry |
---|
68 | # [keyid:ralphs].oset:fruitprice([float:2.50]) <- [string:'blueberry'] |
---|
69 | # |
---|
70 | # ralphs.fruitprice(0.50)<-orange |
---|
71 | # [keyid:ralphs].oset:fruitprice([float:0.50]) <- [string:'orange'] |
---|
72 | # |
---|
73 | |
---|