diff options
Diffstat (limited to 'tools/certtools.py')
-rw-r--r-- | tools/certtools.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tools/certtools.py b/tools/certtools.py index 2165781..9296401 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 + "ct/v1/get-sth").read() + result = urlopen(baseurl + "open/gaol/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 + "ct/v1/get-proof-by-hash?" + params).read() + urlopen(baseurl + "open/gaol/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 + "ct/v1/get-sth-consistency?" + params).read() + urlopen(baseurl + "open/gaol/v1/get-sth-consistency?" + params).read() return json.loads(result)["consistency"] except urllib2.HTTPError, e: print "ERROR:", e.read() @@ -179,7 +179,7 @@ def unpack_tls_array(packed_data, length_len): def add_chain(baseurl, submission): try: - result = urlopen(baseurl + "ct/v1/add-blob", json.dumps(submission)).read() + result = urlopen(baseurl + "open/gaol/v1/add-blob", json.dumps(submission)).read() return json.loads(result) except urllib2.HTTPError, e: print "ERROR", e.code,":", e.read() @@ -196,7 +196,7 @@ def add_chain(baseurl, submission): def add_prechain(baseurl, submission): try: - result = urlopen(baseurl + "ct/v1/add-pre-chain", + result = urlopen(baseurl + "open/gaol/v1/add-pre-chain", json.dumps(submission)).read() return json.loads(result) except urllib2.HTTPError, e: @@ -215,7 +215,7 @@ def add_prechain(baseurl, submission): def get_entries(baseurl, start, end): params = urllib.urlencode({"start":start, "end":end}) try: - result = urlopen(baseurl + "ct/v1/get-entries?" + params).read() + result = urlopen(baseurl + "open/gaol/v1/get-entries?" + params).read() return json.loads(result) except urllib2.HTTPError, e: print "ERROR:", e.read() |