# Issue in create pcsid in simulation

**URL:** <https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565>\
**Category:** FATOORA portal and Simulation portal\
**Created:** [August 20, 2023, 10:40am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565 "2023-08-20T10:40:34Z")\
**Posts on this page:** 3\
**Page:** 2

<div class="post-metadata">

**Author:** ![saalotaibi](https://avatars.discourse-cdn.com/v4/letter/s/f9ae1b/32.png) [@saalotaibi](https://zatca1.discourse.group/u/saalotaibi)\
**Post date:** [October 27, 2024, 11:58am UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/21 "2024-10-27T11:58:18Z")

</div>

Dear @AhmedTarekYA

The requirement is that the certificate template name field in the config CNF file differs on the simulation from the production environment.

---

<div class="post-metadata">

**Author:** ![AhmedTarekYA](https://avatars.discourse-cdn.com/v4/letter/a/9fc29f/32.png) [@AhmedTarekYA](https://zatca1.discourse.group/u/AhmedTarekYA)\
**Post date:** [October 27, 2024, 12:02pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/22 "2024-10-27T12:02:01Z")

</div>

what is the wrong here ? \<?php

// 2.2.2 Profile specification of the Cryptographic Stamp identifiers. & CSR field contents / RDNs.  
return \<\<\<TEXT

# ------------------------------------------------------------------

# Default section for “req” command options

# ------------------------------------------------------------------

[req]

# Password for reading in existing private key file

# input\_password = SET\_PRIVATE\_KEY\_PASS

# Prompt for DN field values and CSR attributes in ASCII

prompt = no  
utf8 = no

# Section pointer for DN field options

distinguished\_name = my\_req\_dn\_prompt

# Extensions

req\_extensions = v3\_req

[v3\_req]  
#basicConstraints=CA:FALSE  
#keyUsage = digitalSignature, keyEncipherment

# Production or Testing Template (TSTZATCA-Code-Signing - ZATCA-Code-Signing)

1.3.6.1.4.1.311.20.2 = ASN1:UTF8String:SET\_PRODUCTION\_VALUE  
subjectAltName=dirName:dir\_sect

[dir\_sect]

# EGS Serial number (1-SolutionName|2-ModelOrVersion|3-serialNumber)

SN = SET\_EGS\_SERIAL\_NUMBER

# VAT Registration number of TaxPayer (Organization identifier [15 digits begins with 3 and ends with 3])

UID = SET\_VAT\_REGISTRATION\_NUMBER

# Invoice type (TSCZ)(1 = supported, 0 not supported) (Tax, Simplified, future use, future use)

title = 0100

# Location (branch address or website)

registeredAddress = SET\_BRANCH\_LOCATION

# Industry (industry sector name)

businessCategory = SET\_BRANCH\_INDUSTRY

# ------------------------------------------------------------------

# Section for prompting DN field values to create “subject”

# ------------------------------------------------------------------

[my\_req\_dn\_prompt]

# Common name (EGS TaxPayer PROVIDED ID [FREE TEXT])

commonName = SET\_COMMON\_NAME

# Organization Unit (Branch name)

organizationalUnitName = SET\_BRANCH\_NAME

# Organization name (Tax payer name)

organizationName = SET\_TAXPAYER\_NAME

# ISO2 country code is required with US as default

countryName = SA  
TEXT;  
can you edit it to be ok with simulation ?

---

<div class="post-metadata">

**Author:** ![eCloud](https://dub1.discourse-cdn.com/flex013/user_avatar/zatca1.discourse.group/ecloud/32/629_2.png) [@eCloud](https://zatca1.discourse.group/u/eCloud)\
**Post date:** [October 27, 2024, 1:13pm UTC](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565/23 "2024-10-27T13:13:44Z")

</div>

> [@AhmedTarekYA](#):
>
> can you edit it to be ok with simulation ?

I don’t understand what information you provided above.  
But it seems like you want to create a CSR using OpenSSL.

You need a config.cnf to create a CSR using OpenSSL. Here is an example of a config.cnf according to the csr-config.properties as suggested by Zatca.

From this CSR Config Properties

```auto
csr.common.name=MNG-886431145-399999999900003
csr.serial.number=1-MNG|2-MNG|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

```

for Simulation Environment, Config.cnf Should be

```auto
oid_section = OIDs
[OIDs]
certificateTemplateName=1.3.6.1.4.1.1311.20.2

[req]
default_bits = 2048
emailAddress = email@email.com
req_extensions = v3_req
x509_extensions = v3_ca
prompt = no
default_md = sha256
req_extensions = req_ext
distinguished_name = dn

[dn]
CN=MNG-886431145-399999999900003
OU=Riyadh Branch
O=Maximum Speed Tech Supply LTD
C=SA

[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-MNG|2-MNG|3-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f
UID=399999999900003
title=1100
registeredAddress=RRRD2929
businessCategory=Supply activities

```

[Previous page](https://zatca1.discourse.group/t/issue-in-create-pcsid-in-simulation/565.md?page=1)
