Closed CollinEMac closed 3 weeks ago
This is a stab at addressing the issue discussed here: Consider cryptography 42.x.x new validation #948
All I did is raise a InvalidKeyError when there is a ValueError and return cast(RSAPublicKey, load_pem_public_key(key_bytes)) fails.
InvalidKeyError
return cast(RSAPublicKey, load_pem_public_key(key_bytes))
fix https://github.com/jpadilla/pyjwt/issues/948
@CollinEMac Can you link this PR to issue #948 ?
To do this, you just need to add the following to the end of the PR description:
fix #948
This is a stab at addressing the issue discussed here: Consider cryptography 42.x.x new validation #948
All I did is raise a
InvalidKeyError
when there is a ValueError andreturn cast(RSAPublicKey, load_pem_public_key(key_bytes))
fails.fix https://github.com/jpadilla/pyjwt/issues/948