summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/compileconfig.py')
-rwxr-xr-xtools/compileconfig.py6
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))),