What certificates are trusted in truststore?
Asked Answered
H

2

51

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!

Husserl answered 8/2, 2012 at 21:30 Comment(1)
For a truststore with just certificates, you don't actually need to enter a password either. You can just press enter when prompted for a password, and the certificates are still displayed.Accidence
P
39

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

Yes there is.The exact same command since keystore and truststore differ only in what they store i.e. private key or signed public key (certificate)

No other difference

Percussion answered 8/2, 2012 at 21:52 Comment(0)
O
83

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
Oquassa answered 8/2, 2012 at 21:37 Comment(1)
You can also set the password as the -storepass <your_password> argument, and not type it manually.Wedded
P
39

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

Yes there is.The exact same command since keystore and truststore differ only in what they store i.e. private key or signed public key (certificate)

No other difference

Percussion answered 8/2, 2012 at 21:52 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.