I'my trying to decrypt a P7M file in a XML file using openssl, command line:
openssl.exe smime -inform DER -verify -in fattura.p7m -out fattura.xml
With this command openssl is unable to decrypt a P7M with EIDAS signature (I think is this the problem, other files with different signature are ok). In dos, I have this error message:
Error reading S/MIME message
6984:error:0909006C:PEM routines:get_name:no start line:crypto\pem\pem_lib.c:745:Expecting: PKCS7
Error reading S/MIME message
10788:error:0D0680A8:asn1 encoding routines:asn1_check_tlen:wrong tag:crypto\asn1\tasn_dec.c:1130:
10788:error:0D07803A:asn1 encoding routines:asn1_item_embed_d2i:nested asn1 error:crypto\asn1\tasn_dec.c:290:Type=PKCS7_ISSUER_AND_SERIAL
10788:error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:crypto\asn1\tasn_dec.c:627:Field=issuer_and_serial, Type=PKCS7_SIGNER_INFO
10788:error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:crypto\asn1\tasn_dec.c:596:Field=signer_info, Type=PKCS7_SIGNED
10788:error:0D08303A:asn1 encoding routines:asn1_template_noexp_d2i:nested asn1 error:crypto\asn1\tasn_dec.c:627:
10788:error:0D08403A:asn1 encoding routines:asn1_template_ex_d2i:nested asn1 err or:crypto\asn1\tasn_dec.c:477:Field=d.sign, Type=PKCS7