aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRob Austein <sra@hactrn.net>2014-09-30 01:47:28 +0000
committerRob Austein <sra@hactrn.net>2014-09-30 01:47:28 +0000
commitbfc5132f8174bdd9c253bda143c410d796696184 (patch)
tree11ab45158542855500249994a26b0ba8fba3dc49
parent930ec5d8e0e3c12a29cad28d280fe9b32298c122 (diff)
Add hack to yamltest to let Mike extract private keys for BGPSEC testing.
svn path=/trunk/; revision=5978
-rw-r--r--ca/tests/yamltest.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/ca/tests/yamltest.py b/ca/tests/yamltest.py
index 2b65dbd2..0932049b 100644
--- a/ca/tests/yamltest.py
+++ b/ca/tests/yamltest.py
@@ -428,6 +428,12 @@ class allocation(object):
lxml.etree.ElementTree(xml).write(path, pretty_print = True)
if not args.stop_after_config:
self.run_rpkic("add_router_certificate_request", fn)
+ if not args.skip_config and args.store_router_private_keys:
+ path = self.path("%s.routercerts.keys" % d.name)
+ print "Writing", path
+ with open(path, "w") as f:
+ for r in self.router_certs:
+ f.write(r.keypair.get_PEM())
@property
def pubd(self):
@@ -656,6 +662,8 @@ parser.add_argument("--synchronize", action = "store_true",
help = "synchronize IRDB with daemons")
parser.add_argument("--profile", action = "store_true",
help = "enable profiling")
+parser.add_argument("--store-router-private-keys", action = "store_true",
+ help = "write generate router private keys to disk")
parser.add_argument("yaml_file", type = argparse.FileType("r"),
help = "YAML description of test network")
args = parser.parse_args()