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

The docs don't seem to tell us how to specify the passphrase for the "private_key" pem file. #221

Closed
PaulSender opened this issue Dec 23, 2020 · 3 comments
Assignees

Comments

@PaulSender
Copy link

I need to specify a passphrase for my key.pem file in order for the service provider to send a signed request. When doing so, I receive
var ret = this._handle.sign(toBuf(key), passphrase, rsaPadding,
Error: error:06065064:digital envelope routines:EVP_DecryptFinal_ex:bad decrypt

which from my experience just means you need to specify that passphrase but the docs don't tell us how to do that with this particular package. Is this possible or should I use passport-saml?

@mcab
Copy link
Member

mcab commented Feb 3, 2021

Specifying a password to use with the private_key is not directly supported by this library.

However, the underlying dependency (xml-crypto) hints that this error is different: node-saml/xml-crypto#123. Similarly, #168 mentions a different issue on encountering a passphrase.

Can you attempt the issue with and without a passphrase on the private_key?

@mcab mcab self-assigned this Feb 3, 2021
@PaulSender
Copy link
Author

I was able to bypass this issue by creating a pem file without a passphrase.

@mcab
Copy link
Member

mcab commented Feb 9, 2021

Given the proposed solution, I'll close this issue out.

If you don't believe this is satisfactory, feel free to reopen.

@mcab mcab closed this as completed Feb 9, 2021
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