odoo/odoo#199891

Created by fw-bot
Merged at fc55160e8c268379623a9cb26fc16dd48c0b61f5

Statuses:

label
odoo-dev:18.0-17.0-l10n_es_edi_facturae-add-missing-certificate-fields-loug-419714-fw
head
0296d7edacddbbdb1359fc5e2e92a80764e4a73f
merged
4 months ago by Accounting, Ricardo Gomes Rodrigues (rigr)
odoo/odoo
17.0 #196576
saas-17.4 #199852
18.0 #199891
saas-18.1 #199982
saas-18.2 #200007
saas-18.3
master #200045

[FW][FIX] l10n_es_edi_facturae: add missing certificate dields

Certain certificates contain additional fields beyond those currently included (CN, OU, O, C), such as "2.5.4.97" and "L".

Since these additional fields are not incorporated into the issuer name, attempts to validate the signed document on the following sites will result in errors:
- https://face.gob.es/es/facturas/validar-visualizar-facturas
- https://valide.redsara.es/valide/validarFirma/ejecutar.html

These errors typically indicate that the signature is either invalid and that the certificate does not match the values within <KeyInfo>. This discrepancy occurs because all certificate fields are included in the signature, but some are missing from the <X509IssuerName> field.

This fix adds the missing certificate fields to ensure consistency between the signature and the issuer name. Based on my tests, the order of these fields does not affect the validation process.

opw-4484906
opw-4482626

Forward-Port-Of: #199852
Forward-Port-Of: #196576