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