Closed
Description
I noticed that the behavior regarding password protected keys between load_pem_private_key() and load_ssh_private_key() is somewhat inconsistent.
load_pem_private_key() will throw a TypeError if no or a wrong password is given for a protected key or if a password is given for a key without a password.
load_ssh_private_key() will throw a ValueError in the first case, and just import the key if it's unprotected and a password is given.
I'm aware changing it would be an API-breaking change and may impact existing applications, so not sure you want to fix this. Consider it a feature request, and close if it's too much hassle.
Metadata
Metadata
Assignees
Labels
No labels