adriangodong / githubjwt

A helper library to generate GitHub JWT from GitHub Apps private key
MIT License
14 stars 6 forks source link

This library doesnt support private keys with headers #85

Open shaybenh7 opened 1 year ago

shaybenh7 commented 1 year ago

Hey, when I'm trying to create my JWT with my private key that contains the headers: -----BEGIN RSA PRIVATE KEY----- and -----END RSA PRIVATE KEY----- it gets an exception: System.IO.IOException: END RSA PRIVATE KEY was not found. at Org.BouncyCastle.Utilities.IO.Pem.PemReader.ReadPemObject() at Org.BouncyCastle.OpenSsl.PemReader.ReadObject()

when removing it, it works. would you be able to fix it?

shaybenh7 commented 1 year ago

please review https://github.com/adriangodong/githubjwt/pull/86