Unable to decrypt password protected key pkcs8
I am unable to decrypt the password protected key pkcs8
using the command below openssl
. Any ideas on what I am doing wrong?
Command:
openssl pkcs8 -in keyname.pem -out labs.pem
Output:
Error decrypting key
140471497754272:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:tasn_dec.c:1319:
140471497754272:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:tasn_dec.c:381:Type=X509_ALGOR
140471497754272:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:tasn_dec.c:751:Field=pkeyalg, Type=PKCS8_PRIV_KEY_INFO
140471497754272:error:2306A065:PKCS12 routines:PKCS12_item_decrypt_d2i:decode error:p12_decr.c:148:
+3
source to share