more assert

This commit is contained in:
meejah 2022-08-12 01:17:33 -06:00
parent cb065aefbd
commit 4d779cfe07

View File

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