x/crypto/ssh: ParseRawPrivateKey
should return PassphraseMissingError
for ENCRYPTED PRIVATE KEY
#71048
Milestone
ParseRawPrivateKey
should return PassphraseMissingError
for ENCRYPTED PRIVATE KEY
#71048
Go version
go1.23.4
Output of
go env
in your module/workspace:What did you do?
I was validating a Box-generated private key using
ssh.ParseRawPrivateKey
and encountered an unexpected error.Reproducer: https://go.dev/play/p/mX6cEyGa7FO
( The private key is inert and was generated with:
openssl genpkey -algorithm RSA -aes256 -out encrypted_private_key.pem
)What did you see happen?
The function fails due to "ENCRYPTED PRIVATE KEY" not being a supported key type.
What did you expect to see?
The function should actually return
PassphraseMissingError
, per the documentation:The text was updated successfully, but these errors were encountered: