To convert .crt to .jks with openssl, you have to first convert it to .p12 (pfx). After which, you will convert to .jks.
openssl pkcs12 -export -in abc.crt -out abc.p12
If you have .crt, and key file, you need to merge them both into one file, using the code below. Most times, the code below, is what you will use, since most .crt files, come with .crt key file.
openssl pkcs12 -export -in abc.crt -inkey abc.key -out abc.p12
keytool -importkeystore -srckeystore abc.p12 \
-srcstoretype PKCS12 \
-destkeystore abc.jks \
-deststoretype JKS
default alias is 1
password is what you set at the prompt
You can also learn how to convert other certificates.
Convert .Crt Certificates
Convert .Cer Certificates
Convert .jks Certificates
Convert .pem Certificates
Convert .der Certificates
Convert .p7b Certificates
Convert .p12 Certificates
See Also:
How to Setup Email on DigitalOcean
How to Add Sudo User in Ubuntu and Linux with Root Privileges
0 Comments