summaryrefslogtreecommitdiff
path: root/tools/merge_dist.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2016-07-08 16:51:55 +0200
committerLinus Nordberg <linus@nordu.net>2016-07-11 15:37:01 +0200
commitb6ce64e114022ea23668cd69ce0ef7517dbe68ad (patch)
tree9c1b3a3e32e7e35bfd57fa98272b367e1545d403 /tools/merge_dist.py
parente43a199b241d74f7a5ad046139a318576cdf21b6 (diff)
Added permdb support to merge
Diffstat (limited to 'tools/merge_dist.py')
-rwxr-xr-xtools/merge_dist.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/merge_dist.py b/tools/merge_dist.py
index 9831f97..2af1d6c 100755
--- a/tools/merge_dist.py
+++ b/tools/merge_dist.py
@@ -11,7 +11,7 @@ from base64 import b64encode, b64decode
from certtools import timing_point, \
create_ssl_context
from mergetools import get_curpos, get_logorder, chunks, get_missingentries, \
- sendsth, sendlog, sendentry, read_chain, parse_args
+ sendsth, sendlog, sendentry, parse_args, perm
def merge_dist(args, localconfig, frontendnodes, timestamp):
paths = localconfig["paths"]
@@ -19,7 +19,7 @@ def merge_dist(args, localconfig, frontendnodes, timestamp):
"%s/%s-private.pem" % (paths["privatekeys"],
localconfig["nodename"]))
mergedb = paths["mergedb"]
- chainsdir = mergedb + "/chains"
+ chainsdb = perm(localconfig.get("dbbackend", "filedb"), mergedb + "/chains")
logorderfile = mergedb + "/logorder"
sthfile = mergedb + "/sth"
create_ssl_context(cafile=paths["https_cacertfile"])
@@ -92,7 +92,7 @@ def merge_dist(args, localconfig, frontendnodes, timestamp):
for missingentry in missingentries:
ehash = b64decode(missingentry)
sendentryresult = sendentry(nodename, nodeaddress, own_key, paths,
- read_chain(chainsdir, ehash), ehash)
+ chainsdb.get(ehash), ehash)
if sendentryresult["result"] != "ok":
print >>sys.stderr, "sendentry:", sendentryresult
sys.exit(1)