diff options
-rw-r--r-- | Makefile | 16 | ||||
-rwxr-xr-x | tools/merge_backup.py | 2 | ||||
-rwxr-xr-x | tools/merge_fetch.py | 2 | ||||
-rwxr-xr-x | tools/merge_sth.py | 5 | ||||
-rwxr-xr-x | tools/submitcert.py | 1 |
5 files changed, 12 insertions, 14 deletions
@@ -74,7 +74,7 @@ tests-start: tests-run: @(cd $(INSTDIR) && python ../tools/testcase1.py https://localhost:8080/ tests/keys/logkey.pem tests/httpsca/demoCA/cacert.pem) || (echo "Tests failed" ; false) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) @(cd $(INSTDIR) && python ../tools/check-sth.py --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem https://localhost:8080/) || (echo "Check failed" ; false) @(cd $(INSTDIR) && python ../tools/fetchallcerts.py $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || (echo "Verification failed" ; false) @(cd $(INSTDIR) && rm -f submittedcerts) @@ -88,7 +88,7 @@ tests-run: @(cd $(INSTDIR) && python ../tools/submitcert.py --parallel=1 --store ../tools/testcerts/pre2.txt --check-sct --sct-file=submittedcerts $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || (echo "Submission failed" ; false) @(cd $(INSTDIR) && python ../tools/storagegc.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-1.cfg) || (echo "GC failed" ; false) @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) @(cd $(INSTDIR) && python ../tools/check-sth.py --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem https://localhost:8080/) || (echo "Check failed" ; false) @(cd $(INSTDIR) && rm -r fetchcertstore || true) @(cd $(INSTDIR) && mkdir fetchcertstore) @@ -108,7 +108,7 @@ tests-run: @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) @(cd $(INSTDIR) && treesize=$$(../tools/loginfo.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg --treesize https://localhost:8080/) ; \ test "$$treesize" = "7" || (echo "Tree size $$treesize != expected 7" ; false)) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) @(cd $(INSTDIR) && bin/run_erl -daemon ../test/nodes/merge-2/ ../test/nodes/merge-2/log/ "exec bin/erl -config merge-2") @for i in 1 2 3 4 5 6 7 8 9 10; do \ echo "waiting for system to start" ; \ @@ -118,11 +118,11 @@ tests-run: @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) @(cd $(INSTDIR) && treesize=$$(../tools/loginfo.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg --treesize https://localhost:8080/) ; \ test "$$treesize" = "8" || (echo "Tree size $$treesize != expected 8" ; false)) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) tests-run2: @(cd $(INSTDIR) ; python ../tools/verifysct.py --sct-file=submittedcerts --parallel 1 $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || echo "Verification of SCT:s failed" - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) @(cd $(INSTDIR) && python ../tools/storagegc.py --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-1.cfg) || (echo "GC failed" ; false) tests-prepare-merge-takeover: @@ -136,11 +136,11 @@ tests-prepare-merge-takeover: tests-run3: @echo $@ @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) @(cd $(INSTDIR) && python ../tools/submitcert.py --parallel=1 --store ../tools/testcerts/cert7.txt --check-sct --sct-file=submittedcerts-7 $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || (echo "Submission failed" ; false) @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) @(cd $(INSTDIR) ; python ../tools/verifysct.py --sct-file=submittedcerts --parallel 1 $(BASEURL) --publickey=tests/keys/logkey.pem --cafile tests/httpsca/demoCA/cacert.pem) || echo "Verification of SCT:s failed" - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) tests-prepare-redistribute-frontend: @@ -153,7 +153,7 @@ tests-prepare-redistribute-frontend: tests-run4: @echo $@ @(cd $(INSTDIR) && ../tools/merge --config ../test/catlfish-test.cfg --localconfig ../test/catlfish-test-local-merge.cfg) || (echo "Merge failed" ; false) - @(cd $(INSTDIR) && ../tools/verifysth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) + @(cd $(INSTDIR) && ../tools/check-sth.py $(BASEURL) --publickey=tests/keys/logkey.pem --cur-sth=stored-sth --cafile tests/httpsca/demoCA/cacert.pem) tests-stop: @for node in $(NODES); do \ diff --git a/tools/merge_backup.py b/tools/merge_backup.py index ab2625d..abe9f36 100755 --- a/tools/merge_backup.py +++ b/tools/merge_backup.py @@ -154,7 +154,7 @@ def merge_backup(args, config, localconfig, secondaries): backuppath = mergedb + "/verified." + nodename backupdata = {"tree_size": tree_size, "sha256_root_hash": hexencode(root_hash)} - print >>sys.stderr, "DEBUG: writing to", backuppath, ":", backupdata + #print >>sys.stderr, "DEBUG: writing to", backuppath, ":", backupdata write_file(backuppath, backupdata) if args.timing: diff --git a/tools/merge_fetch.py b/tools/merge_fetch.py index b77dea6..3028b30 100755 --- a/tools/merge_fetch.py +++ b/tools/merge_fetch.py @@ -115,7 +115,7 @@ def main(): while True: logsize, last_hash = merge_fetch(args, config, localconfig) currentsize = {"index": logsize - 1, "hash": hexencode(last_hash)} - print >>sys.stderr, "DEBUG: writing to", currentsizefile, ":", currentsize + #print >>sys.stderr, "DEBUG: writing to", currentsizefile, ":", currentsize write_file(currentsizefile, currentsize) if args.interval is None: break diff --git a/tools/merge_sth.py b/tools/merge_sth.py index cf1e994..28ad34f 100755 --- a/tools/merge_sth.py +++ b/tools/merge_sth.py @@ -46,7 +46,7 @@ def merge_sth(args, config, localconfig): tree = {'tree_size': 0, "sha256_root_hash": ''} trees.append(tree) trees.sort(key=lambda e: e['tree_size'], reverse=True) - print >>sys.stderr, "DEBUG: trees:", trees + #print >>sys.stderr, "DEBUG: trees:", trees if backupquorum > len(trees) - 1: print >>sys.stderr, "backup quorum > number of secondaries:", \ @@ -54,8 +54,7 @@ def merge_sth(args, config, localconfig): return tree_size = trees[backupquorum]['tree_size'] root_hash = hexdecode(trees[backupquorum]['sha256_root_hash']) - print >>sys.stderr, "DEBUG: tree size candidate at backupquorum", \ - backupquorum, ":", tree_size + #print >>sys.stderr, "DEBUG: tree size candidate at backupquorum", backupquorum, ":", tree_size cur_sth = get_sth(sthfile) if tree_size < cur_sth['tree_size']: diff --git a/tools/submitcert.py b/tools/submitcert.py index 66d5126..c443cf4 100755 --- a/tools/submitcert.py +++ b/tools/submitcert.py @@ -13,7 +13,6 @@ import struct import hashlib import itertools from certtools import * -from certtools import * from precerttools import * import os import signal |