source: examples/fruits_rt2_typed/README @ 36b100a

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

1) fix up fruits_rt2_typed example to test different types of strings

as oset term

2) fix the abac_pl_yap.c's _abac_yap_query so the first term if given

a literal string will use ReadBuffer? instead of MkAtomTerm?

  • Property mode set to 100755
File size: 2.6 KB
Line 
1#!/bin/sh
2
3rm -rf *.der *.pem
4
5# mary.what2eat<-?-navel orange  good
6# bob.what2eat<-?-navel 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:'black rasberry']
42creddy --attribute \
43        --issuer Ralphs_ID.pem --key Ralphs_private.pem \
44        --oset "fruitprice([float:2.50])" \
45        --subject-obj "[string:'black rasberry']" \
46        --out Ralphs_fruitprice__black_rasberry_attr.der
47
48# [keyid:ralphs].oset:fruitprice([float:0.50]) <- [string:'navel orange']
49creddy --attribute \
50        --issuer Ralphs_ID.pem --key Ralphs_private.pem \
51        --oset "fruitprice([float:0.50])" \
52        --subject-obj "[string:'navel orange']" \
53        --out Ralphs_fruitprice__navel_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)<-black rasberry
68# [keyid:ralphs].oset:fruitprice([float:2.50]) <- [string:'black rasberry']
69#
70# ralphs.fruitprice(0.50)<-navel orange
71# [keyid:ralphs].oset:fruitprice([float:0.50]) <- [string:'navel orange']
72#
73
Note: See TracBrowser for help on using the repository browser.