this is the csr temp # Production or Testing Template (TSTZATCA-Code-Signing - ZATCA-Code-Signing)
1.3.6.1.4.1.311.20.2 =ASN1:PRINTABLESTRING:SET_PRODUCTION_VALUE
subjectAltName=dirName:dir_sect works fine when work in test mode but in simulation i can’t create the csr because i have read that i should make it certificateTemplateName = ASN1:PRINTABLESTRING:SET_PRODUCTION_VALUE
subjectAltName=dirName:dir_sect
Dear @AhmedTarekYA
Please provide more information for better support.
Also, kindly look at this example as it is a valid simulation sample of the cnf configuration file to create the csr from, you can use the template as is just replace / fill with your device information.
oid_section = OIDs
[OIDs]
certificateTemplateName = 1.3.6.1.4.1.311.20.2
[req]
default_bits = 2048
emailAddress = MyEmail@email.com
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=Contoso
CN=EA123456789
[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-ed22f1d8-e6a2-1118-9b58-d9a8f11e445f
UID=300000000000003
title=1100
registeredAddress= MyAddress
businessCategory=Industry
في حالة simluation array:3 [ // app\Traits\ZatcaTrait.php:106
“invoiceHash” => “QECIobn6aWT+awbRLor+XvQjflxRpwYNMsOWyfHl5JY=”
“uuid” => “6f4d20e0-6bfe-4a80-9389-7dabe6620f12”
“invoice” => “PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEludm9pY2UgeG1sbnM9InVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9uOnVibDpzY2hlbWE6eHNkOkludm9pY2UtMiIgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21tb25BZ2dyZWdhdGVDb21wb25l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gICAgICAgICAgICAgIDxzYmM6UmVmZXJlbmNlZFNpZ25hdHVyZUlEPnVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9uOnVibDpzaWduYXR1cmU6SW52b2ljZTwvc2JjOlJlZmVyZW5jZWRTaWduYXR1cmVJRD4KICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlNpZ25hdHVyZSB4bWxuczpkcz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC8wOS94bWxkc2lnIyIgSWQ9InNpZ25hdHVyZSI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6U2lnbmVkSW5mbz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDYvMTIveG1sLWMxNG4xMSIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduYXR1cmVNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNlY2RzYS1zaGEyNTYiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6UmVmZXJlbmNlIElkPSJpbnZvaWNlU2lnbmVkRGF0YSIgVVJJPSIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6VHJhbnNmb3Jtcz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlhQYXRoPm5vdCgvL2FuY2VzdG9yLW9yLXNlbGY6OmV4dDpVQkxFeHRlbnNpb25zKTwvZHM6WFBhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlhQYXRoPm5vdCgvL2FuY2VzdG9yLW9yLXNlbGY6OmNhYzpTaWduYXR1cmUpPC9kczpYUGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6VHJhbnNmb3JtPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTkvUkVDLXhwYXRoLTE5OTkxMTE2Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WFBhdGg+bm90KC8vYW5jZXN0b3Itb3Itc2VsZjo6Y2FjOkFkZGl0aW9uYWxEb2N1bWVudFJlZmVyZW5jZVtjYmM6SUQ9J1FSJ10pPC9kczpYUGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6VHJhbnNmb3JtPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDYvMTIveG1sLWMxNG4xMSIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGVuYyNzaGEyNTYiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdFZhbHVlPlFFQ0lvYm42YVdUK2F3YlJMb3IrWHZRamZseFJwd1lOTXNPV3lmSGw1Slk9PC9kczpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlJlZmVyZW5jZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6UmVmZXJlbmNlIFR5cGU9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNTaWduYXR1cmVQcm9wZXJ0aWVzIiBVUkk9IiN4YWRlc1NpZ25lZFByb3BlcnRpZXMiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpEaWdlc3RWYWx1ZT5ZemMxWVRWaFpUSmlNekkwT1dNM1l6SXdNV1prWXpsak5EWm1NR0poTXpnMU9UZGxaakkyTmpVNU9UVTVNVEUyTlRsaVlqQTFNR1U0TTJKbE5HVmlZZz09PC9kczpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlJlZmVyZW5jZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6U2lnbmVkSW5mbz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduYXR1cmVWYWx1ZT5NRVFDSUIvMUlQNzFaeEtpSU5PcGRUekR6U1JhdmVWNW1LSHdleW0wcFVXQnl6ME5BaUI5bHBjekt3UWFEL05ZczVpelJVQms5OHB1YVFrcGZYdDNsYzloSWdNTjBBPT08L2RzOlNpZ25hdHVyZVZhbHVlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOktleUluZm8+C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NVEl4SHpBZEJnb0praWFKay9Jc1pBRUJEQTh6TURJeU1UY3pNemswTURBd01ETXhEVEFMQmdOVkJBd01CREF4TURBeFdqQllCZ05WQkJvTVVURXlOemdndzVqQ3RNT1l3cWZEbU1LeHc1akN1U0REbU1Lbnc1bkNoTU9ad29YRG1jS0V3NW5DZ3lERG1jS0J3NW5DaDhPWXdxOHNJTU9Zd3FmRG1jS0V3NWpDcnNPWndvckRtTUtvdzVqQ3NURU5NQXNHQTFVRUR3d0VSbTl2WkRBS0JnZ3Foa2pPUFFRREFnTklBREJGQWlCQTM5NFRuc1VTVzE0dCtZOE9zQUgrbzM3a28ycFljMkk5QUlYZGJXKzAvQUloQUkxbUhOaVJiRDVjWXJqNjlsMVhraFArbjQ3UW1BMEwrMGFiUzhpZGViNDQ8L2RzOlg1MDlDZXJ0aWZpY2F0ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlg1MDlEYXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kczpLZXlJbmZvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOk9iamVjdD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6UXVhbGlmeWluZ1Byb3BlcnRpZXMgeG1sbnM6eGFkZXM9Imh0dHA6Ly91cmkuZXRzaS5vcmcvMDE5MDMvdjEuMy4yIyIgVGFyZ2V0PSJzaWduYXR1cmUiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6U2lnbmVkUHJvcGVydGllcyB4bWxuczp4YWRlcz0iaHR0cDovL3VyaS5ldHNpLm9yZy8wMTkwMy92MS4zLjIjIiBJZD0ieGFkZXNTaWduZWRQcm9wZXJ0aWVzIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOlNpZ25lZFNpZ25hdHVyZVByb3BlcnRpZXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6U2lnbmluZ1RpbWU+MjAyNC0xMC0yN1QxMzo0NjozMFo8L3hhZGVzOlNpZ25pbmdUaW1lPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOlNpZ25pbmdDZXJ0aWZpY2F0ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8eGFkZXM6Q2VydD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOkNlcnREaWdlc3Q+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6RGlnZXN0VmFsdWU+WmpjMlpURTJPVEk1TmpVeE5tSXlPRE00WlRaak5HSTJPRE00TUdJNU1UQmlPVFZtWVdVME5tWmtNRGxrTURFM05tTmxPVEUxWldFeU1UZGxaR1E1TlE9PTwvZHM6RGlnZXN0VmFsdWU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6Q2VydERpZ2VzdD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOklzc3VlclNlcmlhbD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpYNTA5SXNzdWVyTmFtZT5DTj1lSW52b2ljaW5nPC9kczpYNTA5SXNzdWVyTmFtZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpYNTA5U2VyaWFsTnVtYmVyPjE3MzAwMjM5MzYxNzc8L2RzOlg1MDlTZXJpYWxOdW1iZXI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6SXNzdWVyU2VyaWFsPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6Q2VydD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6U2lnbmluZ0NlcnRpZmljYXRlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOlNpZ25lZFNpZ25hdHVyZVByb3BlcnRpZXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC94YWRlczpTaWduZWRQcm9wZXJ0aWVzPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwveGFkZXM6UXVhbGlmeWluZ1Byb3BlcnRpZXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOk9iamVjdD4KICAgICAgICAgICAgICAgICAgICAgICAgPC9kczpTaWduYXR1cmU+CiAgICAgICAgICAgICAgICAgICAgPC9zYWM6U2lnbmF0dXJlSW5mb3JtYXRpb24+CiAgICAgICAgICAgICAgICA8L3NpZzpVQkxEb2N1bWVudFNpZ25hdHVyZXM+CiAgICAgICAgICAgIDwvZXh0OkV4dGVuc2lvbkNvbnRlbnQ+CiAgICAgICAgPC9leHQ6VUJMRXh0ZW5zaW9uPgogICAgPC9leHQ6VUJMRXh0ZW5zaW9ucz4KICAgIDxjYmM6UHJvZmlsZUlEPnJlcG9ydGluZzoxLjA8L2NiYzpQcm9maWxlSUQ+CiAgICA8Y2JjOklEPklOVi0yMTY1PC9jYmM6SUQ+CiAgICA8Y2JjOlVVSUQ+NmY0ZDIwZTAtNmJmZS00YTgwLTkzODktN2RhYmU2NjIwZjEyPC9jYmM6VVVJRD4KICAgIDxjYmM6SXNzdWVEYXRlPjIwMjQtMTAtMTM8L2NiYzpJc3N1ZURhdGU+CiAgICA8Y2JjOklzc3VlVGlt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gICAgICA8Y2JjOkFtb3VudCBjdXJyZW5jeUlEPSJTQVIiPjAuMDA8L2NiYzpBbW91bnQ+CiAgICAgICAgICAgIDwvY2FjOkFsbG93YW5jZUNoYXJnZT4KICAgICAgICA8L2NhYzpQcmljZT4KICAgIDwvY2FjOkludm9pY2VMaW5lPgo8L0ludm9pY2U+Cg==”
] النتيجة في حالة ال simlution :::::::::::: “{“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-S-08”,“category”:“EN_16931”,“message”:”[BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Standard rated’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Standard Rate’.“,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-O-08”,“category”:“EN_16931”,“message”:”[BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Not subject to VAT’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Not subject to VAT’.“,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-KSA-24”,“category”:“KSA”,“message”:“A VAT breakdown (BG-23) with VAT Category code (BT-118) ‘Not subject to VAT’ shall have a VAT exception reason code (BT-121)”,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-KSA-EN16931-11”,“category”:“KSA”,“message”:“Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129) * (Item net price (BT-146) / item price base quantity (BT-149))) + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)”,“status”:“WARNING”},{“type”:“WARNING”,“code”:“invoiceTimeStamp_QRCODE_INVALID”,“category”:“QRCODE_VALIDATION”,“message”:“Time on QR Code does not match with Invoice Issue Time (KSA-25). If ZATCA’s SDK was used to generate QR Code, kindly use the latest version of SDK”,“status”:“WARNING”}],“errorMessages”:[{“type”:“ERROR”,“code”:“signed-properties-hashing”,“category”:“CERTIFICATE_ERRORS”,“message”:“Invalid signed properties hashing, SignedProperties with id=‘xadesSignedProperties’”,“status”:“ERROR”}],“status”:“ERROR”},“reportingStatus”:“NOT_REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}” // app\Traits\ZatcaTrait.php:106
في حالة التيست array:3 [ // app\Traits\ZatcaTrait.php:106
“invoiceHash” => “QECIobn6aWT+awbRLor+XvQjflxRpwYNMsOWyfHl5JY=”
“uuid” => “6f4d20e0-6bfe-4a80-9389-7dabe6620f12”
“invoice” => “PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz4KPEludm9pY2UgeG1sbnM9InVybjpvYXNpczpuYW1lczpzcGVjaWZpY2F0aW9uOnVibDpzY2hlbWE6eHNkOkludm9pY2UtMiIgeG1sbnM6Y2FjPSJ1cm46b2FzaXM6bmFtZXM6c3BlY2lmaWNhdGlvbjp1Ymw6c2NoZW1hOnhzZDpDb21tb25BZ2dyZWdhdGVDb21wb25lbnRzLTIiIHhtbG5zOmNiYz0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6Q29tbW9uQmFzaWNDb21wb25lbnRzLTIiIHhtbG5zOmV4dD0idXJuOm9hc2lzOm5hbWVzOnNwZWNpZmljYXRpb246dWJsOnNjaGVtYTp4c2Q6Q29tbW9uRXh0ZW5zaW9uQ29tcG9uZW50cy0yIj4KICAgIDxleHQ6VUJMRXh0ZW5zaW9ucz4KICAgICAgICA8ZXh0OlVCTEV4dGVuc2lvbj4KICAgICAgICAgICAgPGV4dDpF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mVkSW5mbz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6Q2Fub25pY2FsaXphdGlvbk1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDYvMTIveG1sLWMxNG4xMSIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduYXR1cmVNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGRzaWctbW9yZSNlY2RzYS1zaGEyNTYiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6UmVmZXJlbmNlIElkPSJpbnZvaWNlU2lnbmVkRGF0YSIgVVJJPSIiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6VHJhbnNmb3Jtcz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlhQYXRoPm5vdCgvL2FuY2VzdG9yLW9yLXNlbGY6OmV4dDpVQkxFeHRlbnNpb25zKTwvZHM6WFBhdGg+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpUcmFuc2Zvcm0gQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy9UUi8xOTk5L1JFQy14cGF0aC0xOTk5MTExNiI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlhQYXRoPm5vdCgvL2FuY2VzdG9yLW9yLXNlbGY6OmNhYzpTaWduYXR1cmUpPC9kczpYUGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6VHJhbnNmb3JtPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnL1RSLzE5OTkvUkVDLXhwYXRoLTE5OTkxMTE2Ij4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WFBhdGg+bm90KC8vYW5jZXN0b3Itb3Itc2VsZjo6Y2FjOkFkZGl0aW9uYWxEb2N1bWVudFJlZmVyZW5jZVtjYmM6SUQ9J1FSJ10pPC9kczpYUGF0aD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6VHJhbnNmb3JtPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlRyYW5zZm9ybSBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDYvMTIveG1sLWMxNG4xMSIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlRyYW5zZm9ybXM+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpEaWdlc3RNZXRob2QgQWxnb3JpdGhtPSJodHRwOi8vd3d3LnczLm9yZy8yMDAxLzA0L3htbGVuYyNzaGEyNTYiLz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdFZhbHVlPlFFQ0lvYm42YVdUK2F3YlJMb3IrWHZRamZseFJwd1lOTXNPV3lmSGw1Slk9PC9kczpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlJlZmVyZW5jZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6UmVmZXJlbmNlIFR5cGU9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvMDkveG1sZHNpZyNTaWduYXR1cmVQcm9wZXJ0aWVzIiBVUkk9IiN4YWRlc1NpZ25lZFByb3BlcnRpZXMiPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6RGlnZXN0TWV0aG9kIEFsZ29yaXRobT0iaHR0cDovL3d3dy53My5vcmcvMjAwMS8wNC94bWxlbmMjc2hhMjU2Ii8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpEaWdlc3RWYWx1ZT5ZbUk1Wm1Jd056VTBOakJrTnpkallqQm1aVEZsT0dVeFptWmtPV1U1Tm1VNFkyRmpaR1UzTVRRNU1qVXlNV0ZtWVRJMk5qVTVaVEF4TlRGaU56WXpZUT09PC9kczpEaWdlc3RWYWx1ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L2RzOlJlZmVyZW5jZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6U2lnbmVkSW5mbz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpTaWduYXR1cmVWYWx1ZT5NRVVDSUQ5dHNFUGNSV1NmRmptQXVKMm1kU1ZDVHYxSUhwOWpJYkZiMS90NjVrUTFBaUVBN2JhRmxjcFI1T2F2dFczemk2YUJGT1U1dk1EUUxkUmlNcTVzOVdUMTczZz08L2RzOlNpZ25hdHVyZVZhbHVlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOktleUluZm8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOlg1MDlEYXRhPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WDUwOUNlcnRpZmljYXRlPk1JSUMvVENDQXFLZ0F3SUJBZ0lHQVpMTmxuZnhNQW9HQ0NxR1NNNDlCQU1DTUJVeEV6QVJCZ05WQkFNTUNtVkpiblp2YVdOcGJtY3dIaGNOTWpReE1ESTNNVEEwTnpFNFdoY05Namt4TURJMk1qRXdNREF3V2pDQjZ6RVhNQlVHQTFVRUF3d09SVWRUTVMwNE9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WRuN0RTdEdoc2FVcE1wRnNNVzBVWmZ6UG1IUDVWT1M3djRkVjBDSVFDckFSekoxRkJGNEptU1FxWnFIM2VGZGRvSnlaZ0FhQk9BQ2ZJY09obnprUT09PC9kczpYNTA5Q2VydGlmaWNhdGU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC9kczpYNTA5RGF0YT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvZHM6S2V5SW5mbz4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIDxkczpPYmplY3Q+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOlF1YWxpZnlpbmdQcm9wZXJ0aWVzIHhtbG5zOnhhZGVzPSJodHRwOi8vdXJpLmV0c2kub3JnLzAxOTAzL3YxLjMuMiMiIFRhcmdldD0ic2lnbmF0dXJlIj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOlNpZ25lZFByb3BlcnRpZXMgeG1sbnM6eGFkZXM9Imh0dHA6Ly91cmkuZXRzaS5vcmcvMDE5MDMvdjEuMy4yIyIgSWQ9InhhZGVzU2lnbmVkUHJvcGVydGllcyI+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpTaWduZWRTaWduYXR1cmVQcm9wZXJ0aWVzPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOlNpZ25pbmdUaW1lPjIwMjQtMTAtMjdUMTM6NDc6MjZaPC94YWRlczpTaWduaW5nVGltZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpTaWduaW5nQ2VydGlmaWNhdGU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPHhhZGVzOkNlcnQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpDZXJ0RGlnZXN0PgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdE1ldGhvZCBBbGdvcml0aG09Imh0dHA6Ly93d3cudzMub3JnLzIwMDEvMDQveG1sZW5jI3NoYTI1NiIvPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGRzOkRpZ2VzdFZhbHVlPk9UTTVORGd3WmpKaU5HUmlNalZoWXpWa1l6RXhOR0kwTnpGbU1UVmlOV1JtTjJFMFpqZzBOV1EwWldNeVpUY3paRE0zT0RjMU1EQmlPV1kxTnpFNVl3PT08L2RzOkRpZ2VzdFZhbHVlPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOkNlcnREaWdlc3Q+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDx4YWRlczpJc3N1ZXJTZXJpYWw+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WDUwOUlzc3Vlck5hbWU+Q049ZUludm9pY2luZzwvZHM6WDUwOUlzc3Vlck5hbWU+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8ZHM6WDUwOVNlcmlhbE51bWJlcj4xNzMwMDI2MDQzMzc3PC9kczpYNTA5U2VyaWFsTnVtYmVyPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOklzc3VlclNlcmlhbD4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOkNlcnQ+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3hhZGVzOlNpZ25pbmdDZXJ0aWZpY2F0ZT4KICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPC94YWRlczpTaWduZWRTaWduYXR1cmVQc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AgICAgICAgPC9jYWM6UGFydHlJZGVudGlmaWNhdGlvbj4KICAgICAgICAgICAgPGNhYzpQb3N0YWxBZGRyZXNzPgogICAgICAgICAgICAgICAgPGNiYzpTdHJlZXROYW1lPti02KfYsdi5INin2YTZhdmE2YMg2YHZh9ivPC9jYmM6U3RyZWV0TmFtZT4KICAgICAgICAgICAgICAgIDxjYmM6QnVpbGRpbmdOdW1iZXI+MTI3ODwvY2JjOkJ1aWxkaW5nTnVtYmVyPgogICAgICAgICAgICAgICAgPGNiYzpQbG90SWRlbnRpZmljYXRpb24+MDAwMDwvY2JjOlBsb3RJZGVudGlmaWNhdGlvbj4KICAgICAgICAgICAgICAgIDxjYmM6Q2l0eVN1YmRpdmlzaW9uTmFtZT7Yp9mE2LHZitin2LY8L2NiYzpDaXR5U3ViZGl2aXNpb25OYW1lPgogICAgICAgICAgICAgICAgPGNiYzpDaXR5TmFtZT7Yp9mE2K7Zitio2LE8L2NiYzpDaXR5TmFtZT4KICAgICAgICAgICAgICAgIDxjYmM6UG9zdGFsWm9uZT4zMTk1MjwvY2JjOlBvc3RhbFpvbmU+CiAgICAgICAgICAgICAgICA8Y2FjOkNvdW50cnk+CiAgICAgICAgICAgICAgICAgICAgPGNiYzpJZGVudGlmaWNhdGlvbkNvZGU+U0E8L2NiYzpJZGVudGlmaWNhdGlvbkNvZGU+CiAgICAgICAgICAgICAgICA8L2NhYzpDb3VudHJ5PgogICAgICAgICAgICA8L2NhYzpQb3N0YWxBZGRyZXNzPgogICAgICAgICAgICA8Y2FjOlBhcnR5VGF4U2NoZW1lPgogICAgICAgICAgICAgICAgPGNiYzpDb21wYW55SUQ+MzAyMjE3MzM5NDAwMDAzPC9jYmM6Q29tcGFueUlEPgogICAgICAgICAgICAgICAgPGNhYzpUYXhTY2hlbWU+CiAgICAgICAgICAgICAgICAgICAgPGNiYzpJRD5WQVQ8L2NiYzpJRD4KICAgICAgICAgICAgICAgIDwvY2FjOlRheFNjaGVtZT4KICAgICAgICAgICAg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Y2JjOk5hbWU+CiAgICAgICAgICAgIDxjYWM6Q2xhc3NpZmllZFRheENhdGVnb3J5PgogICAgICAgICAgICAgICAgPGNiYzpJRD5TPC9jYmM6SUQ+CiAgICAgICAgICAgICAgICA8Y2JjOlBlcmNlbnQ+MTUuMDA8L2NiYzpQZXJjZW50PgogICAgICAgICAgICAgICAgPGNhYzpUYXhTY2hlbWU+CiAgICAgICAgICAgICAgICAgICAgPGNiYzpJRD5WQVQ8L2NiYzpJRD4KICAgICAgICAgICAgICAgIDwvY2FjOlRheFNjaGVtZT4KICAgICAgICAgICAgPC9jYWM6Q2xhc3NpZmllZFRheENhdGVnb3J5PgogICAgICAgIDwvY2FjOkl0ZW0+CiAgICAgICAgPGNhYzpQcmljZT4KICAgICAgICAgICAgPGNiYzpQcmljZUFtb3VudCBjdXJyZW5jeUlEPSJTQVIiPjEwPC9jYmM6UHJpY2VBbW91bnQ+CiAgICAgICAgICAgIDxjYWM6QWxsb3dhbmNlQ2hhcmdlPgogICAgICAgICAgICAgICAgPGNiYzpDaGFyZ2VJbmRpY2F0b3I+ZmFsc2U8L2NiYzpDaGFyZ2VJbmRpY2F0b3I+CiAgICAgICAgICAgICAgICA8Y2JjOkFsbG93YW5jZUNoYXJnZVJlYXNvbj7Yrti12YUg2K7Yp9i1INmE2YTZhdmG2KrYrDwvY2JjOkFsbG93YW5jZUNoYXJnZVJlYXNvbj4KICAgICAgICAgICAgICAgIDxjYmM6QW1vdW50IGN1cnJlbmN5SUQ9IlNBUiI+MC4wMDwvY2JjOkFtb3VudD4KICAgICAgICAgICAgPC9jYWM6QWxsb3dhbmNlQ2hhcmdlPgogICAgICAgIDwvY2FjOlByaWNlPgogICAgPC9jYWM6SW52b2ljZUxpbmU+CjwvSW52b2ljZT4K”
] النتيجة الاولي في حالة ال test “{“validationResults”:{“infoMessages”:[{“type”:“INFO”,“code”:“XSD_ZATCA_VALID”,“category”:“XSD validation”,“message”:“Complied with UBL 2.1 standards in line with ZATCA specifications”,“status”:“PASS”}],“warningMessages”:[{“type”:“WARNING”,“code”:“BR-S-08”,“category”:“EN_16931”,“message”:”[BR-S-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Standard rated’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Standard Rate’.“,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-O-08”,“category”:“EN_16931”,“message”:”[BR-O-08]-In a VAT breakdown (BG-23) where the VAT category code (BT-118) is ’ Not subject to VAT’ the VAT category taxable amount (BT-116) shall equal the sum of Invoice line net amounts (BT-131) minus the sum of Document level allowance amounts (BT-92) plus the sum of Document level charge amounts (BT-99) where the VAT category codes (BT-151, BT-95, BT-102) are ‘Not subject to VAT’.“,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-KSA-24”,“category”:“KSA”,“message”:“A VAT breakdown (BG-23) with VAT Category code (BT-118) ‘Not subject to VAT’ shall have a VAT exception reason code (BT-121)”,“status”:“WARNING”},{“type”:“WARNING”,“code”:“BR-KSA-EN16931-11”,“category”:“KSA”,“message”:“Invoice line net amount (BT-131) must equal (Invoiced quantity (BT-129) * (Item net price (BT-146) / item price base quantity (BT-149))) + Sum of invoice line charge amount (BT-141) - Sum of invoice line allowance amount (BT-136)”,“status”:“WARNING”},{“type”:“WARNING”,“code”:“invoiceTimeStamp_QRCODE_INVALID”,“category”:“QRCODE_VALIDATION”,“message”:“Time on QR Code does not match with Invoice Issue Time (KSA-25). If ZATCA’s SDK was used to generate QR Code, kindly use the latest version of SDK”,“status”:“WARNING”}],“errorMessages”:,“status”:“WARNING”},“reportingStatus”:“REPORTED”,“clearanceStatus”:null,“qrSellertStatus”:null,“qrBuyertStatus”:null}” // app\Traits\ZatcaTrait.php:106
Check [req_ext]
Part of your Config
[v3_req]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment
[req_ext]
certificateTemplateName = ASN1:PRINTABLESTRING:TSTZATCA-Code-Signing
subjectAltName = dirName:alt_names
EnvironmentType
NonProduction: TSTZATCA-Code-Signing
Simulation: PREZATCA-Code-Signing
Production: ZATCA-Code-Signing
or share your full config so we can check it
this is my csr temp <?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;
and private function defaultCSRConfig(string $solution_name)
{
$egs_unit = $this->egs_info();
$config = [
‘egs_model’ => $egs_unit[‘model’] ?? ‘IOS’,
‘egs_serial_number’ => $egs_unit[‘uuid’] ?? $this->uuid(),
‘solution_name’ => $solution_name,
‘vat_number’ => $egs_unit[‘VAT_number’],
‘branch_location’ => $egs_unit[‘location’][‘building’] . ’ ’ . $egs_unit[‘location’][‘street’] . ', ’ . $egs_unit[‘location’][‘city’],
‘branch_industry’ => $egs_unit[‘branch_industry’],
‘branch_name’ => $egs_unit[‘branch_name’],
‘taxpayer_name’ => $egs_unit[‘VAT_name’],
‘taxpayer_provided_id’ => $egs_unit[‘custom_id’] ?? ‘EGS1-886431145’,
‘production’ => $egs_unit[‘production’]
];
$template_csr = require base_path('public/ZATCA/templates/csr_template.php');;
if ($config['production'] == 1){
$sign = "ZATCA-Code-Signing";
}
else if ($config['production'] == 0){
$sign = "TSTZATCA-Code-Signing";
}
else{
$sign = "PREZATCA-Code-Signing";
}
// dd($sign);
$template_csr = str_replace('SET_PRIVATE_KEY_PASS', ($config['private_key_pass'] ?? 'SET_PRIVATE_KEY_PASS'), $template_csr);
$template_csr = str_replace('SET_PRODUCTION_VALUE', $sign, $template_csr);
$template_csr = str_replace('SET_EGS_SERIAL_NUMBER', "1-{$config['solution_name']}|2-{$config['egs_model']}|3-{$config['egs_serial_number']}", $template_csr);
$template_csr = str_replace('SET_VAT_REGISTRATION_NUMBER', $config['vat_number'], $template_csr);
$template_csr = str_replace('SET_BRANCH_LOCATION', $config['branch_location'], $template_csr);
$template_csr = str_replace('SET_BRANCH_INDUSTRY', $config['branch_industry'], $template_csr);
$template_csr = str_replace('SET_COMMON_NAME', $config['taxpayer_provided_id'] ?? $config['vat_number'], $template_csr);
$template_csr = str_replace('SET_BRANCH_NAME', $config['branch_name'], $template_csr);
$template_csr = str_replace('SET_TAXPAYER_NAME', $config['taxpayer_name'], $template_csr);
return $template_csr;
}
error is Invalid signed properties hashing, SignedProperties with id=‘xadesSignedProperties’ in simulation mode but all is ok in test mode
------------------------------------------------------------------
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:PRINTABLESTRING: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 this is my file … (SET_ANY_WORD) is a placeholder to pass my dynamic variable
From the two Signed XMLs you shared above,
- I did not find any problems with your Certificate CSID Compliance, and that means there are no problems with the CSR you created.
- In addition to the UBL 2.1 Compliance issue (many Warnings). I also found errors in SignatureValue and SignedPropertiesHash.
For 2nd case, you need to re-check how your code signing the Invoice.
The easiest way to ensure that our code generates SignedPropertiesHash according to Zatca
- Create a Clean Invoice
- Sign the Invoice using the Zatca eInvoice SDK
- Use the ds:X509Certificate and xades:SigningTime values from SignedInvoice in your code. if it produces the same Signed PropertiesHash as the one generated by the Zatca eInvoice SDK, then your code is correct.
To Verify SignatureValue, you can use the following php code:
$publicKey = getPublicKeyFromCertificate($x509CertificateContent);
//echo "Public Key:\n" . $publicKey . "\n";
$xmlHashing = base64_decode($invoiceHash); // Decode invoice hash
if (verifySignature($xmlHashing, $signatureValue, $publicKey)) {
echo "Signature Value is VALID.\n\n";
} else {
echo "Signature Value is INVALID.\n\n";
}
function verifySignature($hashToVerify, $signature, $publicKeyContent) {
// Decode the base64 signature
$signature = base64_decode($signature);
// Create a new public key from the provided content
$publicKey = openssl_pkey_get_public($publicKeyContent);
if ($publicKey === false) {
throw new Exception("Invalid public key.");
}
// Verify the signature using the original data hash
$isValid = openssl_verify($hashToVerify, $signature, $publicKey, OPENSSL_ALGO_SHA256);
return $isValid === 1; // Returns true if the signature is valid
}
This code generated bay AI. I have test it and work well.
any updates ? it is too long time
my config file now is oid_section = OIDs
[OIDs]
certificateTemplateName = 1.3.6.1.4.1.311.20.2
[req]
default_bits = 2048
emailAddress = ahmedtarekya100@email.com
req_extensions = req_ext
prompt = no
default_md = sha256
distinguished_name = dn
[v3_req]
basicConstraints = CA:FALSE
keyUsage = digitalSignature, nonRepudiation, keyEncipherment
[req_ext]
certificateTemplateName = ASN1:PRINTABLESTRING:SET_PRODUCTION_VALUE
subjectAltName = dirName:alt_names
[ dir_sect ]
SN = SET_EGS_SERIAL_NUMBER
UID = SET_VAT_REGISTRATION_NUMBER
title = 0100
registeredAddress = SET_BRANCH_LOCATION
businessCategory = SET_BRANCH_INDUSTRY
[alt_names]
SN = 1-solution_name|2-IOS|3-6f4d20e0-6bfe-4a80-9389-7dabe6620f12
UID = 302217339400003
title = 0100
registeredAddress = 3192 صاري فرعي, الخيبر
businessCategory = Food
[dn]
commonName = SET_COMMON_NAME
organizationalUnitName = SET_BRANCH_NAME
organizationName = SET_TAXPAYER_NAME
countryName = SA
this is my code after i get csr and csid and private key … public function shareInvoice($invoice_id)
{
$invoice = $this->find($invoice_id);
$PIH = $this->getLastHash();
$setting = $this->zatcaSettingService->getSetting();
$line_items = [];
// Loop through each item in the invoice
foreach ($invoice->items as $line) {
$line_items[] = [
'id' => $line->id,
'name' => $line->item->name,
'quantity' => $line->amount,
'tax_exclusive_price' => $line->price,
'VAT_percent' => 0.15,
'other_taxes' => [
['percent_amount' => 0]
],
'discounts' => [
['amount' => $line->discount_value ?? 0, 'reason' => 'خصم خاص للمنتج'],
],
];
}
$invoiceData = [
'buyer_name' => @$invoice->client->name,
'invoice_counter_number' => $invoice->id,
'invoice_serial_number' => "INV-" . $invoice->code . $invoice->id,
'issue_date' => $invoice->created_at->format('Y-m-d'),
'issue_time' => $invoice->created_at->format('H:i:s'),
'previous_invoice_hash' => $PIH,
'line_items' => $line_items,
];
list($signed_invoice_string, $invoice_hash, $qr, $file_path) = $this->signInvoice($invoiceData, $this->egs_info(), $setting['binarySecurityToken'], $setting['private_key']);
$response = json_decode($this->checkInvoiceCompliance($signed_invoice_string, $invoice_hash, $setting['binarySecurityToken'], $setting['secret']), true);
$invoice->update([
'qr' => $qr,
'zatca_status' => $response['reportingStatus'] ?? null,
'error_message' => isset($response['validationResults']['errorMessages']) ? implode(', ', array_column($response['validationResults']['errorMessages'], 'message')) : null,
'xml_file' => $file_path,
'hash_invoice' => $invoice_hash,
]);
return $invoice;
} this is the sign invoice function public function signInvoice(array $invoice, array $egs_unit, string $certificate, string $private_key) // توقيع الشهادة
{
require base_path('public/ZATCA/ZATCASimplifiedTaxInvoice.php');
$zatca_simplified_tax_invoice = new ZATCASimplifiedTaxInvoice();
$invoice_xml = $zatca_simplified_tax_invoice->simplifiedTaxInvoice($invoice, $egs_unit);
$invoice_hash = $zatca_simplified_tax_invoice->getInvoiceHash($invoice_xml);
list($hash, $issuer, $serialNumber, $public_key, $signature)
= $zatca_simplified_tax_invoice->getCertificateInfo($certificate);
$digital_signature = $zatca_simplified_tax_invoice->createInvoiceDigitalSignature($invoice_hash, $private_key);
$qr = $zatca_simplified_tax_invoice->generateQR(
$invoice_xml,
$digital_signature,
$public_key,
$signature,
$invoice_hash
);
$signed_properties_props = [
'sign_timestamp' => date('Y-m-d\TH:i:s\Z'),
'certificate_hash' => $hash, // SignedSignatureProperties/SigningCertificate/CertDigest/<ds:DigestValue>SET_CERTIFICATE_HASH</ds:DigestValue>
'certificate_issuer' => $issuer,
'certificate_serial_number' => $serialNumber
];
$ubl_signature_signed_properties_xml_string_for_signing = $zatca_simplified_tax_invoice->defaultUBLExtensionsSignedPropertiesForSigning($signed_properties_props);
$ubl_signature_signed_properties_xml_string = $zatca_simplified_tax_invoice->defaultUBLExtensionsSignedProperties($signed_properties_props);
$signed_properties_hash = base64_encode(openssl_digest($ubl_signature_signed_properties_xml_string_for_signing, 'sha256'));
// UBL Extensions
$ubl_signature_xml_string = $zatca_simplified_tax_invoice->defaultUBLExtensions(
$invoice_hash, // <ds:DigestValue>SET_INVOICE_HASH</ds:DigestValue>
$signed_properties_hash, // SignatureInformation/Signature/SignedInfo/Reference/<ds:DigestValue>SET_SIGNED_PROPERTIES_HASH</ds:DigestValue>
$digital_signature,
$certificate,
$ubl_signature_signed_properties_xml_string
);
// Set signing elements
$unsigned_invoice_str = $invoice_xml->saveXML();
$unsigned_invoice_str = str_replace('SET_UBL_EXTENSIONS_STRING', $ubl_signature_xml_string, $unsigned_invoice_str);
$unsigned_invoice_str = str_replace('SET_QR_CODE_DATA', $qr, $unsigned_invoice_str);
$signed_invoice = new DOMDocument();
$signed_invoice->loadXML($unsigned_invoice_str);
$signed_invoice_string = $signed_invoice->saveXML();
//$signed_invoice_string = $zatca_simplified_tax_invoice->signedPropertiesIndentationFix($signed_invoice_string);
// Define the directory and file path
$directory_path = storage_path('invoices');
$name = $invoice['invoice_serial_number'];
$file_path = $directory_path . "/invoice{$name}.xml";
// Create the directory if it doesn't exist
if (!file_exists($directory_path)) {
mkdir($directory_path, 0777, true);
}
// Save the signed invoice XML to a file
file_put_contents($file_path, $signed_invoice_string);
return [$signed_invoice_string, $invoice_hash, $qr,"/invoice{$name}.xml"];
} and public function getCertificateInfo(string $certificate_string): array
{
$cleaned_certificate_string = $this->cleanUpCertificateString($certificate_string);
$wrapped_certificate_string = "-----BEGIN CERTIFICATE-----\n{$cleaned_certificate_string}\n-----END CERTIFICATE-----";
$hash = $this->getCertificateHash($cleaned_certificate_string);
$x509 = openssl_x509_parse($wrapped_certificate_string);
// Signature, and public key extraction from x509 PEM certificate (asn1 rfc5280)
// Crypto module does not have those functionalities so i'm the crypto boy now :(
// https://github.com/nodejs/node/blob/main/ZATCA/crypto/crypto_x509.cc
// https://linuxctl.com/2017/02/x509-certificate-manual-signature-verification/
// https://github.com/junkurihara/js-x509-utils/blob/develop/ZATCA/x509.js
// decode binary x509-formatted object
$res = openssl_get_publickey($wrapped_certificate_string);
$cert = openssl_pkey_get_details($res);
$public_key = str_replace(['-----BEGIN PUBLIC KEY-----', '-----END PUBLIC KEY-----'], '', $cert['key']);
return [
$hash,
'CN=' . implode(', ', array_reverse((array) $x509['issuer'])),
$x509['serialNumber'],
base64_decode($public_key),
$this->getCertificateSignature($wrapped_certificate_string),
];
}
public function getCertificateSignature(string $cer): string
{
$res = openssl_x509_read($cer);
openssl_x509_export($res, $out, FALSE);
$out = explode('Signature Algorithm:', $out);
$out = explode('-----BEGIN CERTIFICATE-----', $out[2]);
$out = explode("\n", $out[0]);
$out = $out[1] . $out[2] . $out[3] . $out[4];
$out = str_replace([':', ' '], '', $out);
return pack('H*', $out);
}
private function getCertificateHash($cleanup_certificate_string): string
{
$hash = openssl_digest($cleanup_certificate_string, ‘sha256’);
return base64_encode($hash);
} public function createInvoiceDigitalSignature(string $invoice_hash, string $private_key)
{
$invoice_hash_bytes = base64_encode($invoice_hash);
$cleanedup_private_key_string = $this->cleanUpPrivateKeyString($private_key);
$wrapped_private_key_string = “-----BEGIN EC PRIVATE KEY-----\n{$cleanedup_private_key_string}\n-----END EC PRIVATE KEY-----”;
base64_encode(openssl_sign($invoice_hash_bytes, $binary_signature, $wrapped_private_key_string, 'sha256'));
return base64_encode($binary_signature);
} is there is any error here in sign invoice ?
What updates do you expect?
You should re-read all the guides provided by Zatca to understand what and how Zatca eInvoicing works. I am very sure It is not that difficult if we understand it.
From this guide SigningProcessUpdated.pdf
Get Signature
private static function getDigitalSignature($xmlHashing, $privateKeyContent) {
$hashBytes = base64_decode($xmlHashing);
if ($hashBytes === false) {
throw new Exception("Failed to decode the base64-encoded XML hashing.");
}
$privateKeyContent = str_replace(["\n", "\t"], '', $privateKeyContent);
if (strpos($privateKeyContent, "-----BEGIN EC PRIVATE KEY-----") === false &&
strpos($privateKeyContent, "-----END EC PRIVATE KEY-----") === false) {
$privateKeyContent = "-----BEGIN EC PRIVATE KEY-----\n" .
chunk_split($privateKeyContent, 64, "\n") .
"-----END EC PRIVATE KEY-----\n";
}
$privateKey = openssl_pkey_get_private($privateKeyContent);
if ($privateKey === false) {
throw new Exception("Failed to read private key.");
}
$signature = '';
if (!openssl_sign($hashBytes, $signature, $privateKey, OPENSSL_ALGO_SHA256)) {
throw new Exception("Failed to sign the data.");
}
return base64_encode($signature);
}
GetPropertiesHash
private static function getSignedPropertiesHash($signingTime, $digestValue, $x509IssuerName, $x509SerialNumber) {
// Construct the XML string with exactly 36 spaces in front of <xades:SignedSignatureProperties>
$xmlString = '<xades:SignedProperties xmlns:xades="http://uri.etsi.org/01903/v1.3.2#" Id="xadesSignedProperties">' . "\n" .
' <xades:SignedSignatureProperties>' . "\n" .
' <xades:SigningTime>' . $signingTime . '</xades:SigningTime>' . "\n" .
' <xades:SigningCertificate>' . "\n" .
' <xades:Cert>' . "\n" .
' <xades:CertDigest>' . "\n" .
' <ds:DigestMethod xmlns:ds="http://www.w3.org/2000/09/xmldsig#" Algorithm="http://www.w3.org/2001/04/xmlenc#sha256"/>' . "\n" .
' <ds:DigestValue xmlns:ds="http://www.w3.org/2000/09/xmldsig#">' . $digestValue . '</ds:DigestValue>' . "\n" .
' </xades:CertDigest>' . "\n" .
' <xades:IssuerSerial>' . "\n" .
' <ds:X509IssuerName xmlns:ds="http://www.w3.org/2000/09/xmldsig#">' . $x509IssuerName . '</ds:X509IssuerName>' . "\n" .
' <ds:X509SerialNumber xmlns:ds="http://www.w3.org/2000/09/xmldsig#">' . $x509SerialNumber . '</ds:X509SerialNumber>' . "\n" .
' </xades:IssuerSerial>' . "\n" .
' </xades:Cert>' . "\n" .
' </xades:SigningCertificate>' . "\n" .
' </xades:SignedSignatureProperties>' . "\n" .
' </xades:SignedProperties>';
$xmlString = str_replace("\r\n", "\n", $xmlString);
$xmlString = trim($xmlString);
$hashBytes = hash('sha256', $xmlString, true);
$hashHex = bin2hex($hashBytes);
return base64_encode($hashHex);
}
i get error when add this line x509_extensions
yes i can see It is not that difficult clearly wow