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
Private keys created from either openssl genrsa or oci setup config are in encrypted PKCS#8 format by default. However x509.ParsePKCS8PrivateKey only supports unecrypted private keys.
This is a bit of a let down for golang based CLIs where users typically expect to use keys generated from oci setup config.
You could use github.com/youmark/pkcs8 for parsing keys, which supports encrypted keys, instead of the golang std library.
The text was updated successfully, but these errors were encountered:
Hi @obno, not sure if this is your exact use case, but could you use helpers.PrivateKeyFromBytesWithPassword ? It should take the key, decrypt it, and then parse with x509.ParsePKCS8PrivateKey.
Private keys created from either
openssl genrsa
oroci setup config
are in encrypted PKCS#8 format by default. Howeverx509.ParsePKCS8PrivateKey
only supports unecrypted private keys.This is a bit of a let down for golang based CLIs where users typically expect to use keys generated from
oci setup config
.You could use
github.com/youmark/pkcs8
for parsing keys, which supports encrypted keys, instead of the golang std library.The text was updated successfully, but these errors were encountered: