2
0
mirror of https://github.com/xcat2/confluent.git synced 2024-11-22 01:22:00 +00:00

Fix base64 decode of fingerprint

base64 was being done against wrong variable
This commit is contained in:
Jarrod Johnson 2022-07-21 08:33:12 -04:00
parent 7751a71851
commit 79421a724f

View File

@ -161,7 +161,7 @@ def cert_matches(fingerprint, certificate):
if not fingerprint or not certificate:
return False
if '$' not in fingerprint:
fingerprint = base64.b64decode(certificate)
fingerprint = base64.b64decode(fingerprint)
algo = hashlens[len(fingerprint)]
return algo(certificate).digest() == fingerprint
algo, _, fp = fingerprint.partition('$')