Maybe not, is possible to check online the certificates, as Adobe do?

Onofre

-----Original Message-----
From: 1T3XT info [mailto:[email protected]] 
Sent: quinta-feira, 28 de Janeiro de 2010 09:35
To: Post all your questions about iText here
Subject: Re: [iText-questions] Pdf signature validation

Sérgio Onofre wrote:
> 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/();

So you're loading the cacerts key store from the lib directory
of your Java home directory. But does this keystore contain the
same root certificate as the Trusted Certificates in Adobe?

> Object fails[] = 
> PdfPKCS7./verifyCertificates/(pkc, ks, *null*, cal);
> *if* (fails == *null*) {
>  result += “Certification ok” + "\n";
> }

----------------------------------------------------------------------------
--
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/


------------------------------------------------------------------------------
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