javascriptpdfacrobat

Signature invalid with AATL Certificate


I have working code/pdf if I trust a self-signed certificate. Moving to an AATL Certificate, I added the EE and Intermediate certificate to the pkcs7. The digital signature still comes out as Invalid in Acrobat. Here is the file.

pdf_with_signature


Solution

  • In the SignerInfo structure in the CMS signature container in your signature the encrypted signed hash decrypts to

    6F331BA35E6D2D3A39213E08ADA1FD1356ED8A09DAEE4F8ED0BC5E56FA6DC1FCDA825D045B97A80FAF3F015209D5181872223D467CC02F9D59BCF1689DEBE524
    

    but the actual hash value of the signed attributes is

    ACB6D660BFF3D645F93B5A59346D54DA5B0BEDA70BBC6FAE948A40B8C0AC79312E8484743E6C2D93AE133CF9719A15B389944E6CAB999D44B9D5A6A081D5370F
    

    Apparently you have a bug in your hashing of the signed attributes.

    Also:

    I added the EE and Intermediate certificate to the pkcs7

    I only see the signer certificate there.