summaryrefslogtreecommitdiff
path: root/tools/merge_dist.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2016-07-08 16:51:55 +0200
committerMagnus Ahltorp <map@kth.se>2016-07-08 16:51:55 +0200
commit9039104a2203e3467a2420348e5cee43eb5bd5af (patch)
tree6f6e565cf504aaab6b43fb60734b89142dc25477 /tools/merge_dist.py
parented94e0682912a8ee16cb5a1427166c3e77b51b50 (diff)
Added permdb support to mergecatlfish-78
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)