Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PEM_read_bio_PrivateKey - Unexpectedly found nil while unwrapping an Optional value #22

Closed
chili-ios opened this issue Jan 7, 2019 · 2 comments

Comments

@chili-ios
Copy link

Hi,

Could you please help with generating right JWT_PUBLIC and JWT_SECRET?

I'm generating RSA key:
openssl genrsa -out rsa-1024.pem 1024

Then I'm using script from here - #12 and getting N and D

N:
4BuKaDkZohgQLHs0UnWslEP6K7hv9woHOP7jLN/c+YVVcsZjBVQ6IdkLEm6L9E+bENDSAdyVNdQOAAz6gcsSoQzmvNQ5HFpqdnOUH0Qnv4o0fQiAJUalO7y5O0ON9nHvKQRaOnifSPlg9l7ZDwNttz5w7K+FVkmNqHKrtmSVkQU=
D:
AJDffOPPNdDheWMn6jT8OSpHn2uv+UFbzDt+GmGh/fmXxhtCQDTrtAC5jDzIFdVDuNxwAbKOZC69/KbvvOk227zmxtlWbZeFUptwd/bEHbID061E27bQ6VOQl63kCb3WO4f5efXxNvLvxI/fFJX9t9ICJC73n1C+wteXIOzN0Cep

But it doesn't work like that.

image

@calebkleveter
Copy link
Contributor

I would recommend just running these openssl commands and using the value in the rsa_private.pem and rsa_public.pem files that are created.

openssl genrsa -out rsa_private.pem 2048
openssl rsa -in rsa_private.pem -pubout -out rsa_public.pem

@chili-ios
Copy link
Author

Augh... that works :) thank you @calebkleveter

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants