mei_rt2mei_rt2_fix_1
Last change
on this file since 5f551d3 was
5f551d3,
checked in by Mei <mei@…>, 12 years ago
|
1) add more python examples
|
-
Property mode set to
100755
|
File size:
560 bytes
|
Rev | Line | |
---|
[5f551d3] | 1 | #!/usr/bin/env python |
---|
| 2 | |
---|
| 3 | """ |
---|
| 4 | to test with python |
---|
| 5 | |
---|
| 6 | |
---|
| 7 | """ |
---|
| 8 | import os |
---|
| 9 | import ABAC |
---|
| 10 | |
---|
| 11 | ctxt = ABAC.Context() |
---|
| 12 | |
---|
| 13 | acmeID=ABAC.ID("Acme", 0) |
---|
| 14 | acmeID.id_write_cert("Acme_ID.pem") |
---|
| 15 | acmeID.id_write_privkey("Acme_private.pem") |
---|
| 16 | |
---|
| 17 | bobID=ABAC.ID("Bob", 0) |
---|
| 18 | bobID.id_write_cert("Bob_ID.pem") |
---|
| 19 | bobID.id_write_privkey("Bob_private.pem") |
---|
| 20 | |
---|
| 21 | aliceID=ABAC.ID("Alice", 0) |
---|
| 22 | aliceID.id_write_cert("Alice_ID.pem") |
---|
| 23 | aliceID.id_write_privkey("Alice_private.pem") |
---|
| 24 | |
---|
| 25 | globotronID=ABAC.ID("Globotron", 0) |
---|
| 26 | globotronID.id_write_cert("Globotron_ID.pem") |
---|
| 27 | globotronID.id_write_privkey("Globotron_private.pem") |
---|
| 28 | |
---|
| 29 | |
---|
Note: See
TracBrowser
for help on using the repository browser.