summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-23 23:24:11 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-23 23:24:11 +0200
commitcbb556663d8706138efb85a4e011c9fca349d33e (patch)
tree323328f3e5a01d3ccdc07a7921239ad8d0bcfbfe /tools/compileconfig.py
parent5e93578d1f0f1908f70c0e77ed643e0b30cc3028 (diff)
parentf1630b6eb3dd525448aac8d722ccb9f8098e8593 (diff)
Merge branch 'mergesecondary'
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))),