Skip to content

Commit

Permalink
Fix compatibility with openssl 3.x
Browse files Browse the repository at this point in the history
  • Loading branch information
ctz committed May 30, 2023
1 parent e3cc7e9 commit a3ac1f3
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions build.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit a3ac1f3

Please sign in to comment.