Getting an error message "document got corrupted" after PDF file gets signed successfully !
We have created a third party adobe signature plugin to sign the document and i am using Adobe PDF Default method to verify the signature.
The PDF signature box has been getting signed. Later, If we tap on the signature box, the reader displays with an error message "Invalid Cert and Document got corrupted"
Here is the problem that I am facing.
In the Plugin we are PubSec and have 3 call-backs that we are using,
- PSSigGetSigProperitesProc: Initiating the Signing process and adding the certificate chain
- PSSigAuthenticateProc: This is where we are initiating the 2-Factor Auth dialog and making the API call. The issue that we are facing is at this point we want to have the digest (SHA256) of the document that we want to send with the API. Which we are not able to get that is relevant from the Signature Digest calculation. In the PSSigGetSigValueProc we have the PSSigGetSigValueParams structure that contains the PSDataBuffer object that lets me calculate the digest but I want something similar in Authenticate call as we want to cancel the signing process if the 2-factor in invalid.
I am able to achieve it successfully by calculating the Digest of the PDDataBuffer in PSSigGetSigValueProc callback. But i need to calculate the digest in PSSigAuthenticateProc callback as per my business logic.
Is there something to achieve the correct SHA256 Digest of the PDDataBuffer in the PSSigAuthenticateProc callback to sign and validate the Signature?
Please let me know. I appreciate any help to resolve this issue.
