Help with Signature Validation Failure (CSID OK, Java SDK Valid, Signature FAILS)

Hi everyone :waving_hand:

I’ve successfully obtained a CSID from binarySecurityToken using the TSTZATCA-Code-Signing profile and have passed the Java SDK 3.4.1 validation for [EN][KSA][QR][PIH].

However, signature validation consistently fails with the following errors:

CODE: xadesSignedPropertiesDigestValue, MESSAGE: wrong xadesSignedPropertiesDigestValue
CODE: signatureValue, MESSAGE: wrong signature Value
CODE: signingCertificateDigestValue, MESSAGE: wrong signingCertificateDigestValue

I’ve followed both the “E-Invoicing Detailed Technical Guideline” (step 5, page 52) and the “SigningProcessUpdated.pdf”, ensuring:

  • The invisible SignedProperties template is populated correctly
  • The same values are used in both the actual invoice and the hashable version
  • SHA-256 is applied as described, followed by base64 encoding (ZATCA style: hash → hex → base64)

Despite this, I can’t get [SIGNATURE] to pass validation. :downcast_face_with_sweat:

Has anyone encountered this or can offer insight into how they solved it?

Happy to share sanitized XML snippets or hash output if needed.
Thanks in advance for any guidance!

Dear @Hiro

Thanks for reaching out,

To provide comprehensive support as usual, can I kindly ask you to mention the steps that you followed from the beginning (from generating the CSR)

Additionally, **Note that the latest SDK version is 3.4.1 ** ensure to install it to be comply with all the new business rules.

Thanks,
Ibrahem Daoud.