Wrong X509IssuerName, X509SerialNumber Error in Zatca xml Validation

518 Views Asked by At

Wrong X509IssuerName, X509SerialNumber Error (Zatca FATOORA Simulation portal)

I'm currently integrating KSA Zatca eInvoicing Phase 2 into my workflow and encountering an issue with the FATOORA Simulation portal. The process involves testing on the simulation portal before implementing it on the FATOORA production portal.

Steps Completed:

  1. Generated CSR using a config file (example config file contents provided in the question).
oid_section = OIDs
[OIDs]
certificateTemplateName= 1.3.6.1.4.1.311.20.2
[req]
default_bits = 2048
emailAddress = [email protected]
req_extensions =v3_req
x509_extensions =v3_ca
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn
[dn]
C=SA
OU=3000555085
O=Testing Pvt Ltd
CN = testingstore.com
[v3_req]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment
[req_ext]
certificateTemplateName = ASN1:PRINTABLESTRING:PREZATCA-Code-Signing
subjectAltName= dirName:alt_names
[alt_names]
SN=1-TST|2-TST|3-ed24f1d8-e5a2-1118-9b58-d6a8f11e636f9
UID=300078787800003
title=1100
registeredAddress=JKKA2003
businessCategory=Food Stores

  1. Request a pre-compliance CSID (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance)
  2. Run compliance checks for reporting and clearance (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance/invoices)
  3. Request a production CSID (https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/production/csids)
  4. Signing xml: Signed XML by decoding the binarySecurityToken obtained from step 4 (PCSID) and using it as the certificate in the Zatca SDK.
  5. Validating Signed xml file https://sandbox.zatca.gov.sa/TestXML

While the Standard Invoices XML successfully validates on the https://sandbox.zatca.gov.sa/TestXML site, issues arise when using Simplified Invoice XML. I consistently encounter issues related to incorrect X509IssuerName and X509SerialNumber-->Error image.

  • The values obtained for IssuerName and SerialNumber are(its got from simulation PCSID Certificate):

<ds:X509IssuerName>CN=PEZEINVOICESCA2-CA, DC=extgazt, DC=gov, DC=local</ds:X509IssuerName>
<ds:X509SerialNumber>413713212005634976763820571758723157758585483</ds:X509SerialNumber>

I'm uncertain if this error is due to using FATOORA simulation APIs. Will transitioning to FATOORA core APIs resolve this issue? Any guidance on resolving this X509IssuerName and X509SerialNumber error would be greatly appreciated.

Is there a problem with the issuer name and serial number? Could this issue be a result of using FATOORA simulation APIs? If I switch to FATOORA core APIs, will it resolve itself? I'm seeking a solution for this concern.

0

There are 0 best solutions below