Niccolò,
Niccolÿfffff2 Greppi wrote:
> For a work I have to sign a PDF.
> But not with a common way, because I alredy have the signature and the
> certificates (for example "document.p7s") and obviously the original file
> ("document.pdf"), and I have to put the signature inside the PDF.
>
> I made it in this way: [...]
What you attempt to do is impossible.
Current integrated PDF signatures not only sign the original PDF. They also
sign the PDF structures added to embed the signature with the mere exception
of the encoded signature container itself. Therefore the signature you have
to start with actually does not sign the bytes it is required to sign.
(According to the letter of the original PDF spec you actually could set the
signed byte ranges entry to denote merely the original PDF if you signed in
append mode. Adobe Acrobat and Reader wont accept such signatures, though,
and current PDF-related specs now do require the signed range to be
everything but the signature container.)
Regards, Michael.
--
View this message in context:
http://itext-general.2136553.n4.nabble.com/Put-an-existing-P7S-inside-a-PDF-tp3986090p3986287.html
Sent from the iText - General mailing list archive at Nabble.com.
------------------------------------------------------------------------------
RSA(R) Conference 2012
Save $700 by Nov 18
Register now
http://p.sf.net/sfu/rsa-sfdev2dev1
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples:
http://itextpdf.com/themes/keywords.php