diff options
author | Rob Austein <sra@hactrn.net> | 2008-06-03 21:01:23 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2008-06-03 21:01:23 +0000 |
commit | e5538e6f00165eed41e9a209984d06a2cbf6d6cc (patch) | |
tree | d7886c060028e7e053132be6baf77dac0751e326 /rpkid/irbe-cli.py | |
parent | e5e70443cfbbd305a27bd615b24a0676a8b76e12 (diff) |
Misordered element generation after SAX cleanup
svn path=/rpkid/irbe-cli.py; revision=1844
Diffstat (limited to 'rpkid/irbe-cli.py')
-rwxr-xr-x | rpkid/irbe-cli.py | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/rpkid/irbe-cli.py b/rpkid/irbe-cli.py index 53fda759..26fb957b 100755 --- a/rpkid/irbe-cli.py +++ b/rpkid/irbe-cli.py @@ -192,7 +192,7 @@ class publication_cms_msg(rpki.publication.cms_msg): # Usage -top_opts = ["config=", "help", "pem_out="] +top_opts = ["config=", "help", "pem_out=", "verbose"] def usage(code = 1): @@ -212,7 +212,9 @@ def usage(code = 1): # This should probably be a method of an as-yet-unwritten server class def call_daemon(cms_class, client_key, client_cert, server_ta, url, q_msg): - q_cms = cms_class.wrap(q_msg, client_key, client_cert) + q_cms, q_xml = cms_class.wrap(q_msg, client_key, client_cert, pretty_print = True) + if verbose: + print q_xml der = rpki.https.client(client_key = client_key, client_cert = client_cert, server_ta = server_ta, @@ -233,15 +235,18 @@ if not argv: usage(0) cfg_file = "irbe.conf" +verbose = False -opts, argv = getopt.getopt(argv, "c:h?", top_opts) +opts, argv = getopt.getopt(argv, "c:hpv?", top_opts) for o, a in opts: if o in ("-?", "-h", "--help"): usage(0) - if o in ("-c", "--config"): + elif o in ("-c", "--config"): cfg_file = a - if o == "--pem_out": + elif o in ("-p", "--pem_out"): pem_out = a + elif o in ("-v", "--verbose"): + verbose = True if not argv: usage(1) |