You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Assuming a private key file protected by a password exists, it can be loaded with the EVPPkey constructor accepting empty pubkey name, private key name, and passphrase. If The passphrase is empty, the program will prompt the user to type in the key
with a message like Enter PEM pass phrase:. This is unsuitable for library code, since this cannot be reacted to unless the program is running in an interactive terminal.
It would be better to raise an exception, which happens e.g. when the wrong password is supplied.
Describe the bug
Assuming a private key file protected by a password exists, it can be loaded with the
EVPPkey
constructor accepting empty pubkey name, private key name, and passphrase. If The passphrase is empty, the program will prompt the user to type in the keywith a message like
Enter PEM pass phrase:
. This is unsuitable for library code, since this cannot be reacted to unless the program is running in an interactive terminal.It would be better to raise an exception, which happens e.g. when the wrong password is supplied.
To Reproduce
Attached an MVP with an encrypted openssl key
poco.zip
Expected behavior
Poco raises an exception when the key requires a passphrase, but none was supplied
Logs
n/a
Screenshots
Please add relevant environment information:
Additional context
I know this probably comes from OpenSSL, but can this be worked around somehow?
The text was updated successfully, but these errors were encountered: