How to Extract Certificates from JKS Files Using Keytool Commands

We have a requirement that JKS file is available and need to extract the certificates to see and use them in-order to make an alternate arrangement to pass the keystore and trust store JKS files from OpenShift Cluster.

Any Ideas to get this done will be helpful.

@Kishore Sanagapalli

Required Keytool Commands to extract the .JKS files to their original Certificate format is given below.

keytool -list -keystore [file name].jks

keytool -exportcert -alias [alias-name] -keystore [file-name].jks -file [file-name].crt