I'm trying to convert this file in DER format to PEM.
Using openssl.exe utility (tried in versions 0.98.1 and 1.02 of openssl) I tried the following commands:
openssl x509 -inform der PA_AD_RB_V2_3.der -out PA_AD_RB_V2_3.pem
openssl pkcs7 -inform der PA_AD_RB_V2_3.der -print_certs -out PA_AD_RB_V2_3.pem
openssl rsa -inform der -in PA_AD_RB_V2_3.der -out PA_AD_RB_V2_3.pem
All of them return the following errors:
16196:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:./crypto/asn1/tasn_dec.c:1294: 16196:error:0D06C03A:asn1 encoding routines:ASN1_D2I_EX_PRIMITIVE:nested asn1 error:./crypto/asn1/tasn_dec.c:830: 16196:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:./crypto/asn1/tasn_dec.c:749:Field=type, Type=PKCS7
Of course there are some differences between commands but the message is the same. I couldn't figure out what encryption the DER file is encoded, that's why Itried different commands.
Is something wrong in DER file? Or I messed up somewhere in the commands?
My final goal is to pass the PEM file to the -certfile
parameter in smime -sign