SSL certificate on Spring Boot app
Let's say you bought yor SSL certificate, for example from ssls.com, and got your zip files. What's next?
You will need Java SDK installed (you can do it on your dev machine).
We have lafox.net_cert.zip and lafox.net_key.zip . And inside lafox.net.ca-bundle lafox.net.crt lafox.net.p7b lafox.net_key.txt. We need to create lafox-net.jks
Step 1. Convert to PKCS-12
openssl pkcs12 -export -in lafox.net.crt -inkey lafox.net_key.txt -name lafoxnet -out lafox-net.p12
Step 2. Import PKCS-12 file format in JKS keystore
keytool -importkeystore -destkeystore lafox-net.jks -srckeystore lafox-net.p12 -srcstoretype PKCS12
Step 3. Import intermediate trust certificate
keytool -import -alias bundle -trustcacerts -file lafox.net.ca-bundle -keystore lafox-net.jks
Then copy your .jks file to your server.
Step 4. On server:
server:
port: 8443
ssl:
key-store: classpath:your-keystore.jks
key-store-password: your_pass_phrase
key-alias: your-key-alias