> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Felix Joussein
> Sent: Friday, October 27, 2006 2:44 PM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] Signatures and certification
>
> Hello Paulo,
>
> Can you explain shortly why?
> Many people still have Acrobat Reader 6 installed.
It's a lot more difficult.
>
> Will certification work in any further version of Acrobat Reader?
I believe it will but only only Adobe will have a definitive answer on
that.
Paulo
>
> Many thanks,
>
> Felix Joussein
>
> Paulo Soares schrieb:
>
> Certification in iText only works in Acrobat 7.
>
> Paulo
>
>
>
> -----Original Message-----
> From: [EMAIL PROTECTED]
>
> [mailto:[EMAIL PROTECTED] On
> Behalf Of Felix Joussein
> Sent: Friday, October 27, 2006 1:51 PM
> To: Post all your questions about iText here
> Subject: [iText-questions] Signatures and certification
>
> Hello List,
>
> I wrote a little tool using the itext library
> to sign and certify pdf
> documents.
>
> Here the relevant part of the code:
>
> KeyStore ks =
> KeyStore.getInstance("pkcs12");
> ks.load(new FileInputStream(pfxNameVal),
> pfxPassVal.toCharArray());
> String alias =
> (String)ks.aliases().nextElement();
> PrivateKey key =
> (PrivateKey)ks.getKey(alias,
> pfxPassVal.toCharArray());
> java.security.cert.Certificate[] chain =
> ks.getCertificateChain(alias);
> PdfReader reader = new PdfReader(inPDFVal);
> FileOutputStream fout = new
> FileOutputStream(outPDFVal);
> PdfStamper stp =
> PdfStamper.createSignature(reader, fout,
> '\0');
> PdfSignatureAppearance sap =
> stp.getSignatureAppearance();
> sap.setCrypto(key, chain, null,
> PdfSignatureAppearance.WINCER_SIGNED);
> sap.setReason("Ich bin der Autor
> dieses Dokuments.");
> sap.setLocation("Wien");
>
>
> stp.setEncryption(true,pdfUPWVal,pdfAPWVal,PdfWriter.AllowCopy
> +PdfWriter.AllowPrinting);
> if(sigVisVal.equalsIgnoreCase("1")){
> sap.setVisibleSignature(new
> Rectangle(100, 150, 200,
> 200), 1, null);
> }
> if(certVisVal.equalsIgnoreCase("1")){
> sap.setCertified(true);
> }
> stp.close();
>
>
> The result with Acrobat Reader 7.x is as
> expected, a signed,
> certified
> document:
> Document signature is VALID.
> - The document has not been changed since the
> signature was applied.
> - The document is signed by the current user.
>
>
> When opening the same file with Acrobat Reader
> 6.x, it says:
> Document signature is INVALID.
> - There have been changes made to this document
> that invalidate the
> signature.
> - The document is signed by the current user.
>
> When I sign & certify a document using the
> Adobe Acrobat 6, the
> signature is valid in any of the 2 versions above.
>
> What is wrong to this code?
> Can someone help me on that?
>
> Regards,
>
> Felix Joussein
>
Aviso Legal:
Esta mensagem é destinada exclusivamente ao destinatário. Pode conter
informação confidencial ou legalmente protegida. A incorrecta transmissão desta
mensagem não significa a perca de confidencialidade. Se esta mensagem for
recebida por engano, por favor envie-a de volta para o remetente e apague-a do
seu sistema de imediato. É proibido a qualquer pessoa que não o destinatário de
usar, revelar ou distribuir qualquer parte desta mensagem.
Disclaimer:
This message is destined exclusively to the intended receiver. It may contain
confidential or legally protected information. The incorrect transmission of
this message does not mean the loss of its confidentiality. If this message is
received by mistake, please send it back to the sender and delete it from your
system immediately. It is forbidden to any person who is not the intended
receiver to use, distribute or copy any part of this message.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions