source: examples/fruits_rt2_typed/README @ 51b6be3

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

1) add support for float static range constraint
2) add a testcase for testing float static range constraint
3) add runall-fast (skipping the creddy part)

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#!/bin/sh
2
3rm -rf *.der *.pem
4
5# mary.what2eat<-?-orange  good
6# bob.what2eat<-?-orange  bad
7# ralphs.fruitprice(1.50)<-?-apple good
8
9creddy --generate --cn Mary
10creddy --generate --cn Bob
11creddy --generate --cn Ralphs
12
13mary_keyid=`creddy --keyid --cert Mary_ID.pem`
14bob_keyid=`creddy --keyid --cert Bob_ID.pem`
15ralphs_keyid=`creddy --keyid --cert Ralphs_ID.pem`
16
17fruitprice_qP="fruitprice([float:?P:[..2.00]])"
18fruitprice_qP_2="fruitprice([float:?P:[1.00..5.00]])"
19
20# [keyid:mary].oset:what2eat
21#      <- [keyid:ralphs].oset:fruitprice([float:?P:[..2.00]])
22creddy --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]])
29creddy --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']
35creddy --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']
42creddy --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']
49creddy --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
Note: See TracBrowser for help on using the repository browser.