compare bytes to bytes

This commit is contained in:
meejah 2022-08-12 00:34:47 -06:00
parent 02cb4105b3
commit ad027aff76

View File

@ -466,7 +466,7 @@ def create_grid_manager_verifier(keys, certs, public_key, now_fn=None, bad_cert=
now = now_fn() now = now_fn()
for cert in valid_certs: for cert in valid_certs:
expires = datetime.utcfromtimestamp(cert['expires']) expires = datetime.utcfromtimestamp(cert['expires'])
if cert['public_key'].encode("ascii") == public_key: if cert['public_key'] == public_key:
if expires > now: if expires > now:
# not-expired # not-expired
return True return True