diff options
author | Magnus Ahltorp <map@kth.se> | 2015-04-23 18:11:07 +0200 |
---|---|---|
committer | Magnus Ahltorp <map@kth.se> | 2015-04-23 18:11:07 +0200 |
commit | cef3057325c7eba5d4a931a9814202eb9eb574eb (patch) | |
tree | 77a7955ef4e0e4cb304677b7d1bf135fec69755c /tools/compileconfig.py | |
parent | 8c27bafa7f722ddc17d535d3d0fb0758cb532171 (diff) |
Don't require logprivatekey if hsm is configured for a signing node.mergesecondary
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-x | tools/compileconfig.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py index 95c71be..a8fe408 100755 --- a/tools/compileconfig.py +++ b/tools/compileconfig.py @@ -242,10 +242,14 @@ def gen_config(nodename, config, localconfig): (Symbol("services"), services), ] if nodetype == "signingnodes": - plopconfig.append((Symbol("log_private_key"), paths["logprivatekey"])) hsm = localconfig.get("hsm") + if "logprivatekey" in paths: + plopconfig.append((Symbol("log_private_key"), paths["logprivatekey"])) if hsm: plopconfig.append((Symbol("hsm"), [hsm.get("library"), str(hsm.get("slot")), "ecdsa", hsm.get("label"), hsm.get("pin")])) + if not ("logprivatekey" in paths or hsm): + print >>sys.stderr, "Neither logprivatekey nor hsm configured for signing node", nodename + sys.exit(1) plopconfig += [ (Symbol("log_public_key"), paths["logpublickey"]), (Symbol("own_key"), (nodename, "%s/%s-private.pem" % (paths["privatekeys"], nodename))), |