What certificates are trusted in truststore?

code-gijoe picture code-gijoe · Feb 8, 2012 · Viewed 102.5k times · Source

I do not know very well keystore / truststore lingo but as far as I'm concerned, a truststore keeps the certificates trusted by a peer server.

I can view the content of a keystore using

keytool -list -keystore refArchive/testkeystore
Enter keystore password: password 

Is there any equivalent for the truststore? How can I view the trusted certificates?

thx!

Answer

Aravind Yarram picture Aravind Yarram · Feb 8, 2012

Trust store generally (actually should only contain root CAs but this rule is violated in general) contains the certificates that of the root CAs (public CAs or private CAs). You can verify the list of certs in trust store using

keytool -list -v -keystore truststore.jks