Commit 4970f2ce authored by Adrien Dorsaz's avatar Adrien Dorsaz

test: account rollover: fix to avoid multiple dump of the JSON object

parent 0c2136b4
......@@ -58,13 +58,14 @@ def account_rollover(accountkeypath, new_accountkeypath, acme_directory, log=LOG
protected64 = _b64(json.dumps(protected).encode("utf8"))
signature = _openssl("dgst", ["-sha256", "-sign", keypath],
"{0}.{1}".format(protected64, payload64).encode("utf8"))
signedjws = json.dumps({
signedjws = {
"protected": protected64, "payload": payload64,"signature": _b64(signature)
return signedjws
# helper function make signed requests
def _send_signed_request(url, keypath, payload):
nonlocal jws_nonce
data = json.dumps(_sign_request(url, keypath, payload))
resp = urlopen(url, data.encode("utf8"))
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment