Hello to all,
I'm having some troubles adding a second digital signature to an already digitally signed PDF. The library that I'm using in order to handle the PDFs is an open source one, so I'm programmatically editing the PDFs. The first PDF I produce, PDF1 (the PDF with one signature), has a valid digital signature. The second PDF I produce, PDF2 (the PDF with the two signatures), has the second signature marked as valid, but the first one as invalid with the following error:
Error during signature verification.
Unexpected byte range values defining scope of signed data.
Details: The signature byte range is invalid
I've read and applied all the "best practices" on PDF digital signature, so I'm adding the second signature in incremental mode and I'm sure that the second PDF has no changes in the first part, this because if I make a binary comparison of PDF1 and PDF2, the first part of the PDF2 equals PDF1. So if you remove the incremental part from PDF2 (after the first %%EOF), you obtain PDF1 again with the valid digital signature. So the problem seems to be in something new in the incremental part of PDF2 that makes Acrobat Reader X thinks that the first digital signature is invalid.
If you want to see the three PDFs, here are the links:
The original PDF: https://docs.google.com/viewer?a=v&pid=explorer&chrome=true&srcid=0Bzr gexS80Iq_ODQxZTY2MDktNTQyYi00YTE0LTk0MTctYWMxNDFiOWY4MjA5&hl=en_US
Any help will be very apreciated. Best regards.