aboutsummaryrefslogtreecommitdiff
path: root/ca/tests
diff options
context:
space:
mode:
Diffstat (limited to 'ca/tests')
-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 6ef63382..e727789d 100644
--- a/ca/tests/yamltest.py
+++ b/ca/tests/yamltest.py
@@ -441,6 +441,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):
@@ -725,6 +731,8 @@ parser.add_argument("--browser", action = "store_true",
help = "create web browser tabs for GUI")
parser.add_argument("--notify-when-startup-complete", type = int,
help = "send SIGUSR1 to this process when startup is complete")
+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()