Issue
I have some questions about ssl in spring boot. I have files certifications and private key with extension .crt and .key. how can I get from them right format for settings in spring boot like this
server.ssl.key-store-type=PKCS12
server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-password=password
server.ssl.key-alias=tomcat
Solution
To convert a certificate file and private key to PKCS#12(.p12) format, use the below command:
openssl pkcs12 -export -out certificate.p12 -inkey privateKey.key -in certificate.crt -certfile CACert.crt
Please go through the below links for your reference on dealing with https in spring boot.
Answered By - snmaddula
Answer Checked By - David Marino (JavaFixing Volunteer)