Loading...

Import pem certificate into Java KeyStore (jks)

To achieve that we convert the certificate into a binary cert that can be imported by the Java keytool.

First, convert your certificate in a DER format : bashopenssl x509 -outform der -in certificate.pem -out certificate.der And after that, import it in the keystore : bashkeytool -import -alias your-alias -keystore cacerts -file certificate.der