summaryrefslogtreecommitdiff
path: root/tools/josef_experimental_auditor.py
diff options
context:
space:
mode:
Diffstat (limited to 'tools/josef_experimental_auditor.py')
-rwxr-xr-xtools/josef_experimental_auditor.py13
1 files changed, 9 insertions, 4 deletions
diff --git a/tools/josef_experimental_auditor.py b/tools/josef_experimental_auditor.py
index 135bb46..120f4e6 100755
--- a/tools/josef_experimental_auditor.py
+++ b/tools/josef_experimental_auditor.py
@@ -171,7 +171,7 @@ def verify_progress(old, new):
def verify_consistency(old, new):
for url in old:
- # try:
+ try:
if old[url] and new[url] and old[url]["tree_size"]!= new[url]["tree_size"]:
consistency_proof = get_consistency_proof(url, old[url]["tree_size"], new[url]["tree_size"])
decoded_consistency_proof = []
@@ -189,15 +189,20 @@ def verify_consistency(old, new):
print time.strftime("%H:%M:%S") + " New STH from " + url + ", timestamp: " + \
str(new[url]["timestamp"]) + ", size: " + str(new[url]["tree_size"]) + "...OK."
- # except:
- # print "ERROR: Could not verify consistency for " + url
+ except:
+ print "ERROR: Could not verify consistency for " + url
def verify_inclusion_all(old, new):
for url in old:
try:
if old[url] and new[url]:
if old[url]["tree_size"]!= new[url]["tree_size"]:
- entries = get_entries(url, old[url]["tree_size"], new[url]["tree_size"] -1)["entries"]
+ entries = []
+
+ while len(entries) + old[url]["tree_size"]!= new[url]["tree_size"]:
+ entries = get_entries(url, str(int(old[url]["tree_size"]) + len(entries)), new[url]["tree_size"] -1)["entries"]
+ print "Got " + str(len(entries)) + " entries..."
+
success = True
for i in entries:
h = get_leaf_hash(base64.b64decode(i["leaf_input"]))