summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-04-10 15:38:59 +0200
committerMagnus Ahltorp <map@kth.se>2015-04-10 15:44:26 +0200
commit263862c06abd93d39d98fd40007f80b5fe57f030 (patch)
treeb75fed1fdc4aef1f2d45513903e7cd39228e58d9 /tools
parentc092b632d444b5c15aeac30c043c45b40775af60 (diff)
Add HSM support in compileconfig.py
Diffstat (limited to 'tools')
-rwxr-xr-xtools/compileconfig.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/compileconfig.py b/tools/compileconfig.py
index 8b7524d..95c71be 100755
--- a/tools/compileconfig.py
+++ b/tools/compileconfig.py
@@ -243,6 +243,9 @@ def gen_config(nodename, config, localconfig):
]
if nodetype == "signingnodes":
plopconfig.append((Symbol("log_private_key"), paths["logprivatekey"]))
+ hsm = localconfig.get("hsm")
+ if hsm:
+ plopconfig.append((Symbol("hsm"), [hsm.get("library"), str(hsm.get("slot")), "ecdsa", hsm.get("label"), hsm.get("pin")]))
plopconfig += [
(Symbol("log_public_key"), paths["logpublickey"]),
(Symbol("own_key"), (nodename, "%s/%s-private.pem" % (paths["privatekeys"], nodename))),