We might be having .pem file but application accepts only .jks file then we need to convert them into jks format. Let see how to achieve this. Generally .pem file has both private key and certificate but in some case both are in separate files.In that scenario we need merge them in single file.
Now lets import the certificate into keystore using java keytool
That's all , we are done.
cat serverkey.pem servercert.pem | openssl pkcs12 -export -out combinedcert.p12
Now lets import the certificate into keystore using java keytool
keytool -importkeystore -srckeystore combinedcert.p12 -srcstoretype pkcs12 -destkeystore myfile.jks
That's all , we are done.
0 Comments
Post a Comment