We are facing an issue when trying to onboard our system, we always get the below error message when we try to run the compliance csid on the simulation portal
Below are the steps that we have followed, keeping in mind that we have followed the same instructions for other systems before and it was fine
-
Generate the private key by running the command openssl ecparam -name secp256k1 -genkey -noout -out PrivateKey.pem on the server
-
Generate the public key by running the command openssl ec -in PrivateKey.pem -pubout -out PublicKey.pem on the server
-
Generate the CSR file using the command openssl req -new -sha256 -key PrivateKey.pem -extensions v3_req -config config.cnf -out taxpayer.csr (config.cnf content below)
-
Once the CSR generated, we convert it to base64
-
We generated the OTP from fatoora portal (simulation)
-
we call https://gw-fatoora.zatca.gov.sa/e-invoicing/simulation/compliance with the correct OTP in the header and the based64 in the body but then we get the error message below
{
“errorCode”: “400”,
“errorCategory”: “Invalid-CSR”,
“errorMessage”: “The provided Certificate Signing Request (CSR) is invalid.”
}
Please help us resolve the issue
config file content:
oid_section = OIDs
[OIDs]
certificateTemplateName = 1.3.6.1.4.1.311.20.2
[req]
default_bits = 2048
emailAddress = sxxxx@xxx.com.sa
req_extensions = v3_req
x509_extensions = v3_ca
prompt = no
default_md = sha 256
req_extensions = req_ext
distinguished_name = dn
[dn]
C=SA
OU=Riyad Branch
O=Installation xxxxxx Est.
CN=icc-einvoice-dev-1
[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-icc|2-drupal7|3-d7
UID=300xxxxxx00003
title=1000
registeredAddress= Riyadh
businessCategory=IT