Convert PKCS12 certificate for tomcat / JKS Keystore

I have wildcard files from GlobalSign Authority.

root.crt
intermediate.crt
private.key 

I want to configure tomcat HTTPS using the above cert files. I believe Tomcat supports PKCS12 format.

How to convert these certificate files in PKSC12 format? also how do i import them into tomcat repository, especially intermediate certificate?

+3
source share
1 answer

Use openssl to create a PKCS12 file

First create one intcacerts.pem file with your intermediate elements and CA inserted one after another (they must be in PEM format).

Then call openssl

openssl pkcs12 -export -in myservercert.pem -inkey private.key -certfile intcacerts.pem -name "aFriendlyName" -out keyandcerts.p12

(myservercert.pem - PEM, intcacerts.pem CA, , private.key - , )

openssl pkcs12

PKCS12 JKS, -

keytool -importkeystore -srckeystore keyandcerts.p12 -srcstoretype PKCS12 -destkeystore myJKS.jks

+7

All Articles