abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change
on this file since 43a5429 was
43a5429,
checked in by Mike Ryan <mikeryan@…>, 14 years ago
|
install python into python lib dir
|
-
Property mode set to
100755
|
File size:
581 bytes
|
Rev | Line | |
---|
[06e2fc5] | 1 | #!/usr/bin/python |
---|
| 2 | |
---|
| 3 | import sys |
---|
| 4 | from ABAC import * |
---|
| 5 | import pprint |
---|
| 6 | |
---|
| 7 | pp = pprint.PrettyPrinter(indent=4) |
---|
| 8 | |
---|
| 9 | if len(sys.argv) < 2: |
---|
[43a5429] | 10 | print "Usage: abac_prover.py <keystore>" |
---|
[06e2fc5] | 11 | exit(1) |
---|
| 12 | |
---|
| 13 | keystore = sys.argv[1] |
---|
| 14 | |
---|
| 15 | libabac_init() |
---|
| 16 | |
---|
| 17 | ctx = Context() |
---|
| 18 | ctx.load_directory(keystore) |
---|
| 19 | |
---|
| 20 | (success, credentials) = ctx.query( |
---|
[e96c107] | 21 | "06df985dc065fc69b508f6afa8dd127cd29ccc62.fed_create", |
---|
| 22 | "ef3584d91703acc4d9cb0f1f0950a31fc89e0b4c", |
---|
[06e2fc5] | 23 | ) |
---|
| 24 | |
---|
| 25 | for credential in credentials: |
---|
| 26 | print "credential %s <- %s" % (credential.head().string(), credential.tail().string()) |
---|
| 27 | # pp.pprint(credential) |
---|
| 28 | |
---|
| 29 | libabac_deinit() |
---|
Note: See
TracBrowser
for help on using the repository browser.