Default Trusted KeyStore File - cacerts

This section provides a tutorial example on how to view the content of the default trusted KeyStore file, 'cacerts', with the KeyStore tool, 'keytool'. The password to open 'cacerts' is 'changeit'.

To do more tests, we need to learn more about the KeyStore file format and the tool to manage KeyStore files.

According Java documentation, a KeyStore file is a binary that can be used to store multiple private keys and certificates. KeyStore files are usually password protected.

The default tool is the command line tool, "keytool", provided in the JDK package. It can be used manage KeyStore files.

Now let's try to create a copy of the default trusted KeyStore file, "cacerts", and view its content. By the way, the password for "cacerts" is "changeit".

C:\herong>copy \local\jdk\jre\lib\security\cacerts cacerts_original
        1 file(s) copied.

C:\herong>\local\jdk\bin\keytool -list -keystore cacerts_original 
   -storepass changeit

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 75 entries

digicertassuredidrootca, Jan 7, 2008, trustedCertEntry,
trustcenterclass2caii, Jan 7, 2008, trustedCertEntry,
thawtepremiumserverca, Dec 2, 2009, trustedCertEntry,
swisssignplatinumg2ca, Aug 13, 2008, trustedCertEntry,
swisssignsilverg2ca, Aug 13, 2008, trustedCertEntry,
thawteserverca, Dec 2, 2009, trustedCertEntry,
equifaxsecureebusinessca1, Jul 18, 2003, trustedCertEntry,
utnuserfirstclientauthemailca, May 2, 2006, trustedCertEntry,
thawtepersonalfreemailca, Dec 2, 2009, trustedCertEntry,
entrustevca, Apr 28, 2009, trustedCertEntry,
utnuserfirsthardwareca, May 2, 2006, trustedCertEntry,
certumca, Feb 10, 2009, trustedCertEntry,
addtrustclass1ca, May 2, 2006, trustedCertEntry,
equifaxsecureca, Jul 18, 2003, trustedCertEntry,
quovadisrootca3, Jun 9, 2009, trustedCertEntry,
quovadisrootca2, Jun 9, 2009, trustedCertEntry,
digicerthighassuranceevrootca, Jan 7, 2008, trustedCertEntry,
secomvalicertclass1ca, May 1, 2008, trustedCertEntry,
equifaxsecureglobalebusinessca1, Jul 18, 2003, trustedCertEntry,
geotrustuniversalca, Dec 3, 2009, trustedCertEntry,
verisignclass3ca, Dec 2, 2009, trustedCertEntry,
thawteprimaryrootcag3, Nov 24, 2009, trustedCertEntry,
deutschetelekomrootca2, Nov 6, 2008, trustedCertEntry,
utnuserfirstobjectca, May 2, 2006, trustedCertEntry,
geotrustprimaryca, Nov 24, 2009, trustedCertEntry,
baltimorecodesigningca, May 10, 2002, trustedCertEntry,
verisignclass1ca, Dec 2, 2009, trustedCertEntry,
baltimorecybertrustca, May 10, 2002, trustedCertEntry,
starfieldclass2ca, Jan 20, 2005, trustedCertEntry,
camerfirmachamberscommerceca, Oct 10, 2008, trustedCertEntry,
ttelesecglobalrootclass3ca, Feb 10, 2009, trustedCertEntry,
verisignclass3g5ca, Nov 24, 2009, trustedCertEntry,
ttelesecglobalrootclass2ca, Feb 10, 2009, trustedCertEntry,
trustcenteruniversalcai, Jan 7, 2008, trustedCertEntry,
verisignclass3g3ca, Mar 25, 2004, trustedCertEntry,
certplusclass3pprimaryca, May 27, 2009, trustedCertEntry,
certumtrustednetworkca, Feb 10, 2009, trustedCertEntry,
verisignclass3g2ca, Mar 25, 2004, trustedCertEntry,
globalsignr3ca, Aug 17, 2009, trustedCertEntry,
utndatacorpsgcca, May 2, 2006, trustedCertEntry,
secomscrootca2, Aug 17, 2009, trustedCertEntry,
gtecybertrustglobalca, May 10, 2002, trustedCertEntry,
secomscrootca1, May 1, 2008, trustedCertEntry,
trustcenterclass4caii, Jan 7, 2008, trustedCertEntry,
verisignuniversalrootca, Nov 24, 2009, trustedCertEntry,
globalsignr2ca, Aug 1, 2007, trustedCertEntry,
certplusclass2primaryca, May 27, 2009, trustedCertEntry,
digicertglobalrootca, Jan 7, 2008, trustedCertEntry,
globalsignca, Mar 26, 2008, trustedCertEntry,
thawteprimaryrootca, Nov 24, 2009, trustedCertEntry,
geotrustglobalca, Jul 18, 2003, trustedCertEntry,
soneraclass2ca, Mar 28, 2006, trustedCertEntry,
verisigntsaca, Aug 13, 2008, trustedCertEntry,
soneraclass1ca, Mar 28, 2006, trustedCertEntry,
quovadisrootca, Jun 9, 2009, trustedCertEntry,
valicertclass2ca, Jan 20, 2005, trustedCertEntry,
comodoaaaca, May 2, 2006, trustedCertEntry,
addtrustqualifiedca, May 2, 2006, trustedCertEntry,
keynectisrootca, Jun 8, 2009, trustedCertEntry,
aolrootca2, Mar 26, 2008, trustedCertEntry,
addtrustexternalca, May 2, 2006, trustedCertEntry,
verisignclass2g3ca, Mar 25, 2004, trustedCertEntry,
aolrootca1, Jan 17, 2008, trustedCertEntry,
verisignclass2g2ca, Mar 25, 2004, trustedCertEntry,
geotrustprimarycag3, Nov 24, 2009, trustedCertEntry,
swisssigngoldg2ca, Aug 13, 2008, trustedCertEntry,
entrust2048ca, Jan 9, 2003, trustedCertEntry,
gtecybertrust5ca, May 10, 2002, trustedCertEntry,
camerfirmachambersignca, Oct 10, 2008, trustedCertEntry,
camerfirmachambersca, Oct 10, 2008, trustedCertEntry,
entrustsslca, Jan 9, 2003, trustedCertEntry,
godaddyclass2ca, Jan 20, 2005, trustedCertEntry,
verisignclass1g3ca, Mar 25, 2004, trustedCertEntry,
secomevrootca1, May 1, 2008, trustedCertEntry,
verisignclass1g2ca, Mar 25, 2004, trustedCertEntry,

Conclusion, JDK 1.6 provides a default trusted KeyStore file, cacerts, with 75 root CA certificates included. In a KeyStore file, each certificate is assigned with an alias name. The "keystool -list" commands returns a list of alias names as shown above.

Last update: 2011.

Table of Contents

 About This Book

 Introduction of PKI (Public Key Infrastructure)

 Introduction of HTTPS (Hypertext Transfer Protocol Secure)

 Using HTTPS with IE (Internet Explorer) 10

 Using HTTPS with Chrome 40

 Using HTTPS with Firefox 35

 Perl Scripts Communicating with HTTPS Servers

 PHP Scripts Communicating with HTTPS Servers

Java Programs Communicating with HTTPS Servers

 Java Secure Socket Extension (JSSE)

 Using openStream() Method in java.net.URL Class

 javax.net.ssl.trustStore System Property

Default Trusted KeyStore File - cacerts

 PKIX Path Building Failed - No CA Certificate

 Using openConnection() Method in java.net.URL Class

 Certificate Stores and Certificate Console

 .NET Programs Communicating with HTTPS Servers

 CAcert.org - Root CA Offering Free Certificates

 PKI CA Administration - Issuing Certificates

 Digital Signature - Microsoft Word 2007

 Digital Signature - OpenOffice.org 3

 S/MIME and Email Security

 PKI (Public Key Infrastructure) Terminology

 Outdated Tutorials

 References

 PDF Printing Version