summaryrefslogtreecommitdiff
path: root/tools/compileconfig.py
diff options
context:
space:
mode:
authorLinus Nordberg <linus@nordberg.se>2015-04-23 23:23:36 +0200
committerLinus Nordberg <linus@nordberg.se>2015-04-23 23:23:36 +0200
commitf1630b6eb3dd525448aac8d722ccb9f8098e8593 (patch)
tree13aaaeb61018359bc760174c54e1f93b9ee075e8 /tools/compileconfig.py
parent9a5583e983cab73fc0ae419dfd68442fc27c2c3e (diff)
parentcef3057325c7eba5d4a931a9814202eb9eb574eb (diff)
Merge branch 'mergesecondary' of https://git.nordu.net/user/map/catlfish into 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))),