Open aboodman opened 5 years ago
Any update on this?
I end up using the following two commands:
openssl genrsa -des3 -out private.pem 4096
openssl rsa -in private.pem -outform PEM -pubout -out public.pem
This is according to this.
However his third command is not needed here.
Use jwt.ParseRSAPrivateKeyFromPEMWithPassword()
and jwt.ParseRSAPublicKeyFromPEM()
I end up using the following two commands:
openssl genrsa -des3 -out private.pem 4096 openssl rsa -in private.pem -outform PEM -pubout -out public.pem
This is according to this.
However his third command is not needed here.
Use
jwt.ParseRSAPrivateKeyFromPEMWithPassword()
andjwt.ParseRSAPublicKeyFromPEM()
IMHO that should be in the documentation
On OSX, I am generating my key file using:
Then if I test it like this:
Looking at the code, I believe this is because
jwt-go
is relying onpem.Decode
, which is expecting header lines, andssh-keygen -m PEM
only includes those for the private key. However (a) I haven't had trouble manually adding these lines, and (b) I want something easy to tell my own users about how to generate these keys.Do you have an example of how to property create the key pairs, for EC256?