1

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).

Amit Verma
  • 8,660
  • 8
  • 35
  • 40

1 Answers1

0
  1. Generate the keystore starting from your certificate: keytool -import -alias myAlias -file certificate.cert -keystore keystore.p12 -storepass password -storetype PKCS12
  2. Add the generated keystore file to your classpath (eg. under src/main/resources)
  3. 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