summaryrefslogtreecommitdiff
path: root/tools/fetchallcerts.py
diff options
context:
space:
mode:
authorMagnus Ahltorp <map@kth.se>2015-02-23 12:01:20 +0100
committerMagnus Ahltorp <map@kth.se>2015-02-23 12:01:20 +0100
commit7d923377259b1bd67ce860a0fd3c4379adc7387d (patch)
tree7b7b9121613dd1529398e5003bf9acd617ae3f7c /tools/fetchallcerts.py
parent062c633d675a0523ed423f1f4e729d17356f6617 (diff)
Add consistency proof checking to testcase1
Fix consistency proof checking when first size is power of 2
Diffstat (limited to 'tools/fetchallcerts.py')
-rwxr-xr-xtools/fetchallcerts.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tools/fetchallcerts.py b/tools/fetchallcerts.py
index 39ffd64..398c563 100755
--- a/tools/fetchallcerts.py
+++ b/tools/fetchallcerts.py
@@ -170,7 +170,7 @@ print "calculated root hash", base64.b16encode(calculated_root_hash)
if oldsth and oldsth["tree_size"] > 0 and oldsth["tree_size"] != tree_size:
consistency_proof = [base64.decodestring(entry) for entry in get_consistency_proof(args.baseurl, oldsth["tree_size"], tree_size)]
- (old_treehead, new_treehead) = verify_consistency_proof(consistency_proof, oldsth["tree_size"], tree_size)
+ (old_treehead, new_treehead) = verify_consistency_proof(consistency_proof, oldsth["tree_size"], tree_size, base64.b64decode(oldsth["sha256_root_hash"]))
assert old_treehead == base64.b64decode(oldsth["sha256_root_hash"])
assert new_treehead == base64.b64decode(sth["sha256_root_hash"])