Extracting Certificates and Keys

Extracting a Certificate from JKS

To extract a certificate from the JKS, use:

keytool -exportcert -alias myalias -keystore keystore.jks -file mycert.pem

Extracting a Private Key from PKCS12

To extract the private key from a PKCS12 file, use:

openssl pkcs12 -in keystore.p12 -nocerts -out privateKey.pem


  Last updated