-
Notifications
You must be signed in to change notification settings - Fork 107
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
SignFinal error #15
Comments
The error is complaining about your key being invalid. I've highlighted the important bits of the error below:
OpenSSL is very particular about the key format and if its deviates at all it'll blow up. In this case it's complaining that it can't find "ANY PRIVATE KEY" because of "no start line". Your key should look like this:
(note: that's a brand new RSA private key I generated with The start line it's looking for is that |
I'm gonna close this for now, let me know if you need anymore help! |
Thank you so much for the clarification. I followed your instructions and it fixed the error immediately. |
I may need some similar help. I'm adding VAPID to web-push and using
But on the
The
So, (how?) can I use a private key generated by Node Crypto? |
Why does the sign.sign() method not allow single line keys? What is the reasoning behind this, and are there any options we can pass so that it allows single line keys without line breaks? Trying to load the private key through an elastic beanstalk environmental variable. |
@joelwass No, it is an OpenSSL behaviour. Feel free to correctly format the key from your input source. |
I'm trying to generate a signature with jws.sign and I keep getting an error that seems to be coming from crypto.js.
My node code is as follows:
The error I'm getting is:
Do you see anything wrong with the call to jws.sign()? Or any clues as to why this error is being generated?
The text was updated successfully, but these errors were encountered: