This week's book giveaway is in the Agile forum.
We're giving away four copies of The Software Craftsman and have Sandro Mancuso on-line!
See this thread for details.
The moose likes Java in General and the fly likes Certificate Trust Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of The Software Craftsman this week in the Agile forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Certificate Trust" Watch "Certificate Trust" New topic

Certificate Trust

Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
Hi ya all,

I am trying to check if a particular certificate is trusted in a keystore.
I have created a keystore called trust.truststore and in there i have the root and issuing CA certificates as trusted entries. I have loaded this keystore as a

I then have an X509Certificate object which has the public key of a certificate issued by the issuing CA. This X509Certificate is the certificate that i want to check is trusted using the trusted entries in the KeyStore object.

Does anyone know how to check this or could start me off in the right direction ???

Thankyou everyone.
Lanny Gilbert
Ranch Hand

Joined: Jun 11, 2002
Posts: 104
Here's some code that works for the "builtin" Java keystore. I'm sure it can be tweaked to match your keystore.
Patrick McDonogh
Ranch Hand

Joined: Oct 13, 2005
Posts: 89
Thankyou very much.
That helpd me a lot.
Have you tried LearnNowOnline?
subject: Certificate Trust