source: examples/alice_rt1_typed/R @ a9494ad

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

1) update credential string's storage from plain to base64 encoded

in creddy and also in yap db

2) add alice_rt1_typed example directory (complex params)

  • Property mode set to 100755
File size: 2.0 KB
Line 
1#!/bin/sh
2
3## trying out different data param types
4
5#rm -rf *.der *.pem
6
7#creddy --generate --cn Alice
8#creddy --generate --cn Hatter
9#creddy --generate --cn MarchHare
10#creddy --generate --cn Dormouse
11#creddy --generate --cn Tea
12#creddy --generate --cn Party
13
14alice_keyid=`creddy --keyid --cert Alice_ID.pem`
15party_keyid=`creddy --keyid --cert Party_ID.pem`
16tea_keyid=`creddy --keyid --cert Tea_ID.pem`
17hatter_keyid=`creddy --keyid --cert Hatter_ID.pem`
18marchhare_keyid=`creddy --keyid --cert MarchHare_ID.pem`
19dormouse_keyid=`creddy --keyid --cert Dormouse_ID.pem`
20
21friendof_alice="friendOf([keyid:$alice_keyid])"
22friendof_marchhare="friendOf([keyid:$marchhare_keyid])"
23guestof_marchhare="guestOf([keyid:$marchhare_keyid])"
24
25#okay, about_party="about([time:20201101T],[time:20110614T])"
26#okay, about_party="about([keyid:$tea_keyid],[time:20101010T])"
27#bad, about_party="about([keyid:$tea_keyid],[keyid:$alice_keyid])"
28#bad, about_party="about([keyid:$tea_keyid],[time:20100203T],[keyid:$alice_keyid])"
29#about_party="about([keyid:$tea_keyid],[keyid:$alice_keyid],[time:20101010T])"
30about_party="about([keyid:$tea_keyid],[time:20101010T],[boolean:true],[integer:4],[float:-200.0],[float:8],[time:20120205T182930],[string:'guest list'],[urn:'file://usr/local/party/~teaparty'])"
31
32#[keyid:Party].role:about([keyid:tea],[time:201010],[string:'guest list'],[boolean:true],[integer:4]) <- [keyid:Party].role:guestOf([keyid:MarchHare])
33echo "creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role \"$about_party\" --subject-cert Party_ID.pem --subject-role  \"$guestof_marchhare\" --out party_about_party__guestof_marchhare_attr.der"
34/home/mei/Deter/abac/creddy/creddy --attribute --issuer Party_ID.pem --key Party_private.pem --role "$about_party" --subject-cert Party_ID.pem --subject-role  "$guestof_marchhare" --out party_about_party__guestof_marchhare_attr.der
35
36echo "  "
37echo "double checking with creddy --roles -certs party_about_party__guestof_marchhare_attr.der"
38creddy --roles --cert party_about_party__guestof_marchhare_attr.der
39
40
41
Note: See TracBrowser for help on using the repository browser.