Extracting SSL certificate from the Java Keystore (JKS)

To extract SSL certificate and private key from Keystore (JKS) file, run keytool -importkeystore \ -srckeystore keystore.jks \ -destkeystore keystore.p12 \ -deststoretype PKCS12 It will ask for the new Keystore password and current Keystore password. Once you enter the password, JKS file gets converted to P12 format. This will include all certificates in the keystone. … Read more

List contents of jks keystore file

keytool list certificates

To list the content of jks keystore file used by tomcat web server, run command keytool -list -keystore FILE.jks It will ask Keystore password. Once you enter the password, it will list the contents of the file. In the above keystore, there are 5 certificates with names inter, root1, root2, ssl_tomcat2, and tomcat. To get … Read more

keytool

The keytool command is a key and certificate management utility. It enables users to administer their own public/private key pairs and associated certificates for use in self-authentication (where a user authenticates themselves to other users and services) or data integrity and authentication services, by using digital signatures. The keytool command also enables users to cache … Read more