I have configured this certificate with nginx on production and working fine. But I want to configure it in spring boot application itself.
- I have generated CSR from some machine to get the certificate
- SSL provider sent me a .cer certificate
Using below command converted .cer to .p12
keytool -import -alias springboot -file <mydomain>.crt -keystore <mydomain>.p12 -storepass <somepassword>
Configured Spring Boot properties as below
server.port=443
server.ssl.key-store=classpath:<mydomain>.p12
server.ssl.key-store-password=<somepassword>
server.ssl.keyStoreType=PKCS12
server.ssl.key-alias=springboot
But spring boot application is failing to start with below error
Caused by: java.lang.IllegalArgumentException: Alias name [springboot] does not identify a key entry