I have an ssl certificate for a purchased domain. I want to apply this to my spring boot application. How can I implement this? I only found self-singed samples and looking for CA signed certificate (with extension .CERT) implementation example(s).
Asked
Active
Viewed 775 times
1 Answers
0
- Generate the keystore starting from your certificate:
keytool -import -alias myAlias -file certificate.cert -keystore keystore.p12 -storepass password -storetype PKCS12
- Add the generated keystore file to your classpath (eg. under
src/main/resources
) - Add the following properties to enable SSL:
server.ssl.key-store=classpath:keystore.p12
server.ssl.key-store-type=pkcs12
server.ssl.key-store-password=password
server.ssl.key-password=password
server.ssl.key-alias=myAlias
server.port=8443

Domenico Sibilio
- 1,189
- 1
- 7
- 20
-
This will result in having a jks keystore, because you have to specified the storetype paramter: -storetype pkcs12. See here: https://stackoverflow.com/a/43603501/7033189 – Bendegúz Szatmári Feb 10 '21 at 13:06
-
You're right, must've overlooked it. I'll edit the answer, thanks. – Domenico Sibilio Feb 10 '21 at 13:39