From 374900dca397ba8fe38fc028e9eb657feb5ce073 Mon Sep 17 00:00:00 2001 From: Linus Nordberg Date: Sat, 16 Jul 2016 17:26:54 +0200 Subject: WIP NOTE: tests don't work -- SCT's don't validate --- tools/certtools.py | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'tools/certtools.py') diff --git a/tools/certtools.py b/tools/certtools.py index 9296401..ec4177c 100644 --- a/tools/certtools.py +++ b/tools/certtools.py @@ -137,7 +137,7 @@ def pyopenssl_https_get(url): return response_lines[len(response_lines) - 1] def get_sth(baseurl): - result = urlopen(baseurl + "open/gaol/v1/get-sth").read() + result = urlopen(baseurl + "dt/v1/get-sth").read() return json.loads(result) def get_proof_by_hash(baseurl, hash, tree_size): @@ -145,7 +145,7 @@ def get_proof_by_hash(baseurl, hash, tree_size): params = urllib.urlencode({"hash":base64.b64encode(hash), "tree_size":tree_size}) result = \ - urlopen(baseurl + "open/gaol/v1/get-proof-by-hash?" + params).read() + urlopen(baseurl + "dt/v1/get-proof-by-hash?" + params).read() return json.loads(result) except urllib2.HTTPError, e: print "ERROR:", e.read() @@ -156,7 +156,7 @@ def get_consistency_proof(baseurl, tree_size1, tree_size2): params = urllib.urlencode({"first":tree_size1, "second":tree_size2}) result = \ - urlopen(baseurl + "open/gaol/v1/get-sth-consistency?" + params).read() + urlopen(baseurl + "dt/v1/get-sth-consistency?" + params).read() return json.loads(result)["consistency"] except urllib2.HTTPError, e: print "ERROR:", e.read() @@ -179,7 +179,8 @@ def unpack_tls_array(packed_data, length_len): def add_chain(baseurl, submission): try: - result = urlopen(baseurl + "open/gaol/v1/add-blob", json.dumps(submission)).read() + result = urlopen(baseurl + "dt/v1/add-rr-chain", + json.dumps(submission)).read() return json.loads(result) except urllib2.HTTPError, e: print "ERROR", e.code,":", e.read() @@ -196,7 +197,7 @@ def add_chain(baseurl, submission): def add_prechain(baseurl, submission): try: - result = urlopen(baseurl + "open/gaol/v1/add-pre-chain", + result = urlopen(baseurl + "dt/v1/add-pre-chain", json.dumps(submission)).read() return json.loads(result) except urllib2.HTTPError, e: @@ -215,7 +216,7 @@ def add_prechain(baseurl, submission): def get_entries(baseurl, start, end): params = urllib.urlencode({"start":start, "end":end}) try: - result = urlopen(baseurl + "open/gaol/v1/get-entries?" + params).read() + result = urlopen(baseurl + "dt/v1/get-entries?" + params).read() return json.loads(result) except urllib2.HTTPError, e: print "ERROR:", e.read() -- cgit v1.1