source: examples/fruits_rt2_typed/README @ d5bbd3e

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

1) add alumni2_rt1_typed

(target static range constraint)

2) add another rule for fruits example
3) add target static range constraint handling for string & urn

  • Property mode set to 100755
File size: 3.0 KB
Line 
1#!/bin/sh
2
3rm -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
10creddy --generate --cn Mary
11creddy --generate --cn Bob
12creddy --generate --cn Ralphs
13
14mary_keyid=`creddy --keyid --cert Mary_ID.pem`
15bob_keyid=`creddy --keyid --cert Bob_ID.pem`
16ralphs_keyid=`creddy --keyid --cert Ralphs_ID.pem`
17
18fruitprice_qP="fruitprice([float:?P:[..2.00]])"
19fruitprice_qP_2="fruitprice([float:?P:[1.00..5.00]])"
20
21# [keyid:mary].oset:what2eat
22#      <- [keyid:ralphs].oset:fruitprice([float:?P:[..2.00]])
23creddy --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]])
30creddy --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']
36creddy --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']
43creddy --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']
51creddy --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']
58creddy --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
Note: See TracBrowser for help on using the repository browser.