Ask a Question

Advanced Search

Solution ID : SO28992

Last Modified : 05/18/2018

How to view certificate information in a keystore file?

Solution

To view the certificate information in a keystore, run the following command:

keytool -list -v -keystore keystore_name

 

To output the certificate information in a keystore to a text file, run the following command:

keytool -list -v -keystore keystore_name > keystore_output.txt

 

Note: Where keystore_name is the path to your keystore and keystore_output.txt the file that will be created.
You will be prompted to enter the keystore password.

 

Example output:

Keystore type: JKS
Keystore provider: SUN

Your keystore contains 1 entry

Alias name: alias_name
Creation date: Aug 1, 2015
Entry type: PrivateKeyEntry
Certificate chain length: 1
Certificate[1]:
Owner: CN=www.symantec.com, OU=IT, O=Symantec Corporation, L=Mountain View, ST=California, C=US...

 

Note: Where alias_name is the alias for the Private Key.
Creation date must be a date before your certificate issue date.
PrivateKeyEntry confirms that you have a Private Key. If it is missing, the certificate can not be imported.
Certificate chain length: 1 means that the certificate was not imported. When value "3", the certificate and chain are already imported.
CN=www.symantec.com should corresponds to Common Name on your certificate.