Good day,
I'm trying to embedded timestamp information into a pdf signature so that adobe will report to me that the signature was timestamp. Currently, all I've achieved is that Adobe reports that "The signature includes an embedded timestamp but it could not be verified" and when you view the Date/Time properties it says that the "Timestamp Authority" s not available and the "Show Certificate" is greyed out.
Obviously, I am doing something wrong in constructing my PKCS#7 message. But I don't now what. Can someone please help me by describing the steps I need to take so that my signature will be timestamped? Or suggest a tool that can help me find the problem?
I'm using Crypto API. The steps I follow currently is as follows:
- Create a digest of the pdf data using the CryptHashMessage function (SHA256).
- Send this digest to the TSA using the CryptRetrieveTimeStamp function. I've set the *TIMESTAMP_DONT_HASH_DATA* flag so that the digest won't be hashed again.
- The repsonse from the TSA is added to a *CRYPT_SIGN_MESSAGE_PARA* structure as an unauthenticated attribute and the signing time is added as an authenticated attribute.
- Then I use the CryptSignMessage function to sign the original data which uses the above structure.
How can I check that the data is correct so that adobe can show me that the signature has been timestamped?
Regards, Magda
Timestamping is not done correctly. Check my mime library. You need to add an unauthenticated field with oID "1.2.840.113549.1.9.16.2.14".