source: swig/python/prover.py @ fbb591e

abac0-leakabac0-meicompt_changesgec13mei-idmei-rt0-nmei_rt0mei_rt2mei_rt2_fix_1meiyap-rt1meiyap1rt2tvf-new-xml
Last change on this file since fbb591e was 06e2fc5, checked in by Mike Ryan <mikeryan@…>, 14 years ago

add swig

  • Property mode set to 100755
File size: 576 bytes
Line 
1#!/usr/bin/python
2
3import sys
4from ABAC import *
5import pprint
6
7pp = pprint.PrettyPrinter(indent=4)
8
9if len(sys.argv) < 2:
10    print "Usage: prover.py <keystore>"
11    exit(1)
12
13keystore = sys.argv[1]
14
15libabac_init()
16
17ctx = Context()
18ctx.load_directory(keystore)
19
20(success, credentials) = ctx.query(
21    "3f1aca4c5911b345d81c5f1a77675dce13249d0c.fed_create",
22    "5839d714b16bbe108642c5eb586c2173420bed19",
23)
24
25for credential in credentials:
26    print "credential %s <- %s" % (credential.head().string(), credential.tail().string())
27    # pp.pprint(credential)
28
29libabac_deinit()
Note: See TracBrowser for help on using the repository browser.