Hello,

I could need a little help for a problem concearning Signatures.
Within a web application I need to sign PDFs. Currently I'm using the 
PdfStamper like this:

X509Certificate[] = requestBean.getCertificates();
PrivateKey pk = requestBean.getPrivateKey();
PdfReader dReader = new PdfReader(source);
dOut = new FileOutputStream(target);
PdfStamper dStamp = PdfStamper.createSignature(dReader, dOut, '\0', 
null, true);
PdfSignatureAppearance dSap = dStamp.getSignatureAppearance();
dSap.setCrypto(pk, certs, null, PdfSignatureAppearance.WINCER_SIGNED);
dStamp.close();

Well, this works fine, except that AcrobatReader tells me that the 
Signature is invalid.
The Certificate is recognized as valid, but the whole Signature is 
invalid as the file is "altered" ...
The question is, for what reasons could that file be altered and what 
can I do to generate a valid signed pdf?
I don't even touch the "target" file after applying the signature.

Thanks in advance,

Ben

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to