Dear Zatca Team,
I dont know why each and every single time i have to face the same issue of Invalid CSR due to different resaons everytime i try to onboard
i did onbaording 3 months ago at that time i faced this issue and before this i faced it as well
Each and every time i onboard any solution i dont know why.Please Help as it is very Urgent
this is my .cnf file
oid_section = OIDs
[OIDs]
certificateTemplateName = 1.3.6.1.4.1.311.20.2
[req]
default_bits = 2048
emailAddress = mail@xx.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=3109xxxx
O= Company xxx
CN=10106xxxxx
[v3_req]
basicConstraints = CA:FALSE
keyUsage = digitalSignature,nonRepudiation,keyEncipherment
[req_ext]
certificateTemplateName = ASN1:PRINTABLESTRING:ZATCA-Code-Signing
subjectAltName = dirName:alt_names
[alt_names]
SN=1-GRN|2-MCT|3-a6bc16f3-9bd6-4612-a4ce-17415e46ea4d
UID=31090444xxxxx
title=1100
registeredAddress=Riyadh,Saudi Arabia
businessCategory=Consumer Goods
and these are the commands i am using
string File_privatekey = “ec-secp256k1-priv-key.pem”;
openssl ecparam -name secp256k1 -genkey -noout -out "{certPath}{File_privatekey}”
openssl ec -in “{certPath}{File_privatekey}” -pubout -out “{certPath}{File_publickey}”
string File_taxpayer = “taxpayer.csr”;
openssl req -new -sha256 -key “{certPath}{File_privatekey}” -extensions v3_req -config “{csrconfig}” -out “{certPath}{File_taxpayer}”
string File_taxpayerCSRB64 = “taxpayerCSRbase64Encoded.txt”;
if (!RunCommandWithLogging(“openssl”, $“base64 -in “{certPath}{File_taxpayer}” -out “{certPath}{File_taxpayerCSRB64}””, logMessages))
{
return false;
}