jwt icon indicating copy to clipboard operation
jwt copied to clipboard

enable jwt.ParsePublicKeyFromPEM to parse PKCS1 Public Key

Open twocs opened this issue 3 years ago • 0 comments

#119 The code comment for jwt.ParsePublicKeyFromPEM stated that it could parse PKCS1 public keys. However, it couldn't. I created a unit test that generates a public PKCS1 key and the function cannot pass the test. I have added an extra attempt to parse the public key via the x509.ParsePKCS1PublicKey function, but also retained previous functionality that attempts to parse it from PKIX or certificate first.

twocs avatar Nov 06 '21 12:11 twocs