abac0-leak
Last change
on this file since 80f0770 was
ec550f7,
checked in by Mei <mei@…>, 11 years ago
|
1) reworked how API doc is generated
2) tweak top level Makefile.am
3) loading issuer principal as side-effect of loading
an attribute credentials
4) add examples of GENI specific attribute credentials
and principal certificates into the regression testing
5) rename examples to tests
|
-
Property mode set to
100755
|
File size:
484 bytes
|
Rev | Line | |
---|
[a02c849] | 1 | #!/usr/bin/env python |
---|
| 2 | """ |
---|
| 3 | id4.py |
---|
| 4 | """ |
---|
| 5 | import os |
---|
| 6 | import ABAC |
---|
| 7 | |
---|
| 8 | id = ABAC.ID("newGuy", 5*365*3600*24) |
---|
| 9 | |
---|
| 10 | id.write_cert_file("./newGuy.pem") |
---|
| 11 | id.write_privkey_file("./newGuy_key.pem") |
---|
| 12 | |
---|
| 13 | id1 = ABAC.ID("./newGuy.pem") |
---|
| 14 | id1.load_privkey("./newGuy_key.pem") |
---|
| 15 | |
---|
| 16 | try: |
---|
| 17 | f = open("./newGuy.pem") |
---|
| 18 | id2 = ABAC.ID_chunk(f.read()) |
---|
| 19 | f.close() |
---|
| 20 | except: |
---|
| 21 | pass |
---|
| 22 | |
---|
| 23 | print "id has privkey %d" % id.has_privkey() |
---|
| 24 | print "id1 has privkey %d" % id1.has_privkey() |
---|
| 25 | print "id2 has privkey %d" % id2.has_privkey() |
---|
Note: See
TracBrowser
for help on using the repository browser.