summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorrsiddharth <s@ricketyspace.net>2019-07-05 21:16:12 -0400
committerrsiddharth <s@ricketyspace.net>2019-07-05 21:16:12 -0400
commit13280fd32a845bc791d2bdfccd1cfdbb6321e477 (patch)
treeb63b29242f5ba9e6f7c3dc9e0c5b24382f961dd0
parent5f5d2779d0e85f5cdc734e2ffdb9990f0e8b7c87 (diff)
sign_csr.py: Encode accountkey_json.
Encode accountkey_json (to bytes) before passing to hashlib.sha256.
-rw-r--r--sign_csr.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/sign_csr.py b/sign_csr.py
index 90e2578..be9dfd4 100644
--- a/sign_csr.py
+++ b/sign_csr.py
@@ -61,7 +61,7 @@ def sign_csr(pubkey, csr, email=None, file_based=False):
},
}
accountkey_json = json.dumps(header['jwk'], sort_keys=True, separators=(',', ':'))
- thumbprint = _b64(hashlib.sha256(accountkey_json).digest())
+ thumbprint = _b64(hashlib.sha256(accountkey_json.encode()).digest())
sys.stderr.write("Found public key!\n")
# Step 2: Get the domain names to be certified