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

Hello,

I have the same problem, any news about this issue?

I think that the aproach to avoid to have to use the openssl.exe to convert a pfx password protected would be to use the dlls of openssl instead of to have a control over de OIDS that in the current version is doing the library

Thank you

Hello,

Have been lots of improvements from @Bernard in the last months regarding spanish certificates processing. Have you tried with latest versions?

Latest time I tried signing I was using PFX certificates. Now I'm trying from Windows certificate store but private key is not available at this time.

Probably he could tell us more about this topic current state.

Regards,

Hi Manuel,
Did you solve your issue with the latest version?