Buongiorno a tutti,
ecco il file file p7m incriminato
su decine di fatture ho problema a decifrare una .p7m di ENEL ENERGIA (solo questa, le altre di ENEL non mi danno problemi)
Uso il comando Openssl:
openssl smime -verify -noverify -in file.pem -inform DER -out file.xml 2>&1
Solo su questa mi restituisce questo errore
Error reading S/MIME message
10380:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1316:
10380:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:380:Type=PKCS7_ISSUER_AND_SERIAL
10380:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:748:Field=issuer_and_serial, Type=PKCS7_SIGNER_INFO
10380:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:709:Field=signer_info, Type=PKCS7_SIGNED
10380:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:748:
10380:error:0D08403A:asn1 encoding routines:ASN1_TEMPLATE_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:578:Field=d.sign, Type=PKCS7
Ho provato ad estrarre il certificato con il comando OPENSSL
openssl pkcs7 -inform DER -in file.p7m -print_certs -out cert.pem 2>&1
e, sempre solo per questa fattura, non me lo estrae e mi genera il seguente errore
unable to load PKCS7 object
11072:error:0D0680A8:asn1 encoding routines:ASN1_CHECK_TLEN:wrong tag:.\crypto\asn1\tasn_dec.c:1316:
11072:error:0D07803A:asn1 encoding routines:ASN1_ITEM_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:380:Type=PKCS7_ISSUER_AND_SERIAL
11072:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:748:Field=issuer_and_serial, Type=PKCS7_SIGNER_INFO
11072:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:709:Field=signer_info, Type=PKCS7_SIGNED
11072:error:0D08303A:asn1 encoding routines:ASN1_TEMPLATE_NOEXP_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:748:
11072:error:0D08403A:asn1 encoding routines:ASN1_TEMPLATE_EX_D2I:nested asn1 error:.\crypto\asn1\tasn_dec.c:578:Field=d.sign, Type=PKCS7
Non so più dove sbattere la testa