New Forum | Previous | Next | (P-PDF) Developers
Topic: Problem in Overwriting Digital Signature Contents Key
Conf: (P-PDF) Developers, Msg: 94080
Date: 8/10/2003 05:42 AM
Hi Digital Signature Guys!
I am implementing a digital signature plug-in using Adobe Acrobat DigSig sample. I choose the PKCS7 signature format. As you know that "DSCommitSign" calls a method named “CreateDummyV” in which it allocates a dummy space for upcoming valid contents (PKCS7). When system calls "DSFinishSign" to overwrite the signature dictionary fields I make a PKCS7 data in "UpdateV" method and store it in the signature dictionary using "DigSigOverwriteHexstring".
Now the basic problem starts from here… I will clear it to you by giving an example… I assigns 3000 bytes for upcoming PKCS7 object coz if the new object will be greater (4000 bytes) than already assigned hex formated string (dummy contents) then it will not be overwritten by "DigSigOverwriteHexstring" and if the new PKCS7 data size is smaller (1200) than already assigned one then "DigSigOverwriteHexstring" padd the left over space with blank space. Atleast to write signature in dictionary i take some extra space but by doing this only my own written plug-in can verify the digital signature and it fails in interpretability checking. Fails by testing with adobe self sign or any other plug-in that is using PKCS7 signature format.
Can any one of you help me in regards? to remove these blank padings or to get the original size of contents while working in the "CreateDummyV" method (to save my self from assigning extra space for upcoming contents). thanks in advance..