From a3ac1f3c1adecf4528a8ec928d71581e5f096b13 Mon Sep 17 00:00:00 2001 From: Joseph Birr-Pixton Date: Tue, 30 May 2023 19:28:40 +0100 Subject: [PATCH] Fix compatibility with openssl 3.x --- build.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/build.py b/build.py index 6e05a4f..b1f7b8c 100644 --- a/build.py +++ b/build.py @@ -85,10 +85,10 @@ def calc_spki_hash(cert): stdin = subprocess.PIPE, stdout = subprocess.PIPE) stdout, _ = proc.communicate(cert.encode('utf-8')) - stdout = stdout.decode('utf-8') + stdout = stdout.decode('utf-8').lower() assert proc.returncode == 0 - assert stdout.startswith('SHA256 Fingerprint=') - hash = stdout.replace('SHA256 Fingerprint=', '').replace(':', '') + assert stdout.startswith('sha256 fingerprint=') + hash = stdout.replace('sha256 fingerprint=', '').replace(':', '') hash = hash.strip() assert len(hash) == 64 return hash.lower()