Here is my code:

 

                             PdfReader reader = new PdfReader(signedPDF);

 

                              AcroFields af = reader.getAcroFields();

 

                              PdfPKCS7 pk = af.verifySignature(name);

 

                             java.security.cert.Certificate[] pkc =
pk.getCertificates();

                                   

KeyStore ks = PdfPKCS7.loadCacertsKeyStore();

 

                             Object fails[] =
PdfPKCS7.verifyCertificates(pkc, ks, null,

                                         cal);

                             if (fails == null) {

                                   result += “Certification ok” + "\n";

                             }

Onofre

 

From: Mathieu Fortin [mailto:[email protected]] 
Sent: quarta-feira, 27 de Janeiro de 2010 18:14
To: Post all your questions about iText here
Subject: Re: [iText-questions] Pdf signature validation

 

It would help if you could post your validation code.

 

  _____  

De : Sérgio Onofre [mailto:[email protected]] 
Envoyé : January 27, 2010 12:59 PM
À : 'Post all your questions about iText here'
Objet : Re: [iText-questions] Pdf signature validation

 

I can validate it with reader, as Acrobat. But I try to develop a validator
with itext and doesn’t work…

 

Onofre

 

 

From: Mathieu Fortin [mailto:[email protected]] 
Sent: terça-feira, 26 de Janeiro de 2010 18:29
To: [email protected]
Subject: Re: [iText-questions] Pdf signature validation

 

Ocsp is used for long term validation. In order to use it, you have to embed
the ocsp info in the pdf AND your signature provider must have the ocsp
server component up and running.

But still, without ocsp/embedded crl you should be able to validate the pdf
in reader on whatever computer.

Can you post the pdf? 


Notarius Inc. 
700-1080 Côte du Beaver Hall 
Montréal, Québec, H2Z 1S8 

Avis de confidentialité / Confidentiality Notice 

Notarius Inc. - Certifié ISO 9001 : 2000 
Centre de certification du Québec - Certifié ISO 27001 : 2005 

  _____  

From: Sérgio Onofre 
To: [email protected] 
Sent: Tue Jan 26 09:36:42 2010
Subject: [iText-questions] Pdf signature validation 

Hi,

 

            I’m using itext to sign pdf documents with smart cards
certificates and it Works fine. 

 

            The problem I have is verifying the signatures throw the itext
in Java. It only works in the computer where is installed the smart-card. I
see that Acrobat Reader uses OCSP connection to validate the signature, how
I can use also a connection to validate it?

 

Thanks 

Onofre

 

------------------------------------------------------------------------------
The Planet: dedicated and managed hosting, cloud storage, colocation
Stay online with enterprise data centers and the best network in the business
Choose flexible plans and management services without long-term contracts
Personal 24x7 support from experience hosting pros just a phone call away.
http://p.sf.net/sfu/theplanet-com
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php
Check the site with examples before you ask questions: 
http://www.1t3xt.info/examples/
You can also search the keywords list: http://1t3xt.info/tutorials/keywords/

Reply via email to