I’m not very familiar with openssl, maybe this way (using the provided .NET SDK) will be much easier to understand.
This how we can create CSR
using .Net SDK
Download SDK
goto Zatca
Extract downloaded file to Directory C:\
Copy file
C:\zatca-einvoicing-sdk-238-R3.3.3\Data\Input\csr-config-example-EN.properties
to
C:\zatca-einvoicing-sdk-238-R3.3.3\Lib.Net\csr-config-example-EN.properties
Edit file content using Notepad, and save.
csr.common.name=TST-886431145-399999999900003
csr.serial.number=1-TST|2-TST|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f
csr.organization.identifier=399999999900003
csr.organization.unit.name=Riyadh Branch
csr.organization.name=Maximum Speed Tech Supply LTD
csr.country.name=SA
csr.invoice.type=1100
csr.location.address=RRRD2929
csr.industry.business.category=Supply activities
Rename edited file csr-config-example-EN.properties to csr.config
Open Terminal Command Prompt
cd \
cd C:\zatca-einvoicing-sdk-238-R3.3.3\Lib\.Net\Test
fatooranet.exe csr -csrConfig ..\csr.config -generatedCsr ..\cert.csr -privateKey ..\ec-secp256k1-priv-key.pem -nonprod true
this command will generate 2 file
C:\zatca-einvoicing-sdk-238-R3.3.3\Lib.Net\cert.csr
C:\zatca-einvoicing-sdk-238-R3.3.3\Lib.Net\ec-secp256k1-priv-key.pem
use cert.csr content (open with notepad) as csr data to get CCSID.
hope this help