From 13280fd32a845bc791d2bdfccd1cfdbb6321e477 Mon Sep 17 00:00:00 2001 From: rsiddharth Date: Fri, 5 Jul 2019 21:16:12 -0400 Subject: sign_csr.py: Encode accountkey_json. Encode accountkey_json (to bytes) before passing to hashlib.sha256. --- sign_csr.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 -- cgit v1.2.3