XAdES-BES for Facturae (Spanish electronic invoicing)

Hello,

I'm using TMS Cryptography Pack 5.0.3 beta and trying to sign an XML following Facturae specification (Spanish electronic invoicing). This should be supported as is XAdES-BES with some added code, but I'm having some problems:

  • I'm not able to load PKCS#12 certificates issued by FNMT (Spanish government), as they have OID 1.2.840.113549.1.12.1.3 so SHA-1 is used and it's deprecated in TMS CP 5. It's possible to use them in any way?
  • Using openssl I've extracted certificate and key in separate PEM files but when assigning TAdES.CertFilePath and so calling function TX509Certificate.Decode, it enters in a endless loop around line 2380 of X509Obj.pas, trying to process subjectAltName in certificate. I can provide an example certificate privately, if needed for debug.

I'll report here success as Facturae is going to be mandatory in Spain in a few months so probably this topic could help more people.

Thanks for your support,

Hello,
Can you send me the certificate at bernard@tmssoftware.com?
I will have a look next week, but with no guarantee at this stage as there can be lots of implications with PFX certificates and all their options.
Regards,
bernard

1 Like