aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2008-06-03 21:01:23 +0000
committerRob Austein <sra@hactrn.net>2008-06-03 21:01:23 +0000
commite5538e6f00165eed41e9a209984d06a2cbf6d6cc (patch)
treed7886c060028e7e053132be6baf77dac0751e326
parente5e70443cfbbd305a27bd615b24a0676a8b76e12 (diff)
Misordered element generation after SAX cleanup
svn path=/rpkid/irbe-cli.py; revision=1844
-rwxr-xr-xrpkid/irbe-cli.py15
-rw-r--r--rpkid/rpki/left_right.py2
2 files changed, 11 insertions, 6 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)
diff --git a/rpkid/rpki/left_right.py b/rpkid/rpki/left_right.py
index 04f35529..eea4149e 100644
--- a/rpkid/rpki/left_right.py
+++ b/rpkid/rpki/left_right.py
@@ -236,7 +236,7 @@ class bsc_elt(data_elt):
element_name = "bsc"
attributes = ("action", "tag", "self_id", "bsc_id", "key_type", "hash_alg", "key_length")
- elements = ("pkcs10_request", "signing_cert", "signing_cert_crl")
+ elements = ("signing_cert", "signing_cert_crl", "pkcs10_request")
booleans = ("generate_keypair",)
sql_template = rpki.sql.template("bsc", "bsc_id", "self_id", "hash_alg",