title: Adding .crt to Spring Boot to enable SSL
body: <p>I have never done this before, and most of the tutorials do not mention how to deal with .crt files. </p>
  
  <p>I bought an SSL certificate from GoDaddy, and selected Tomcat as a platform when downloading it. The zip file contained 3 files:   </p>
  
  <pre><code>dea08asdjakjawl.crt  
  gd_bundle-g1-g1.crt  
  gdig.crt.pem  
  </code></pre>
  
  <p>I have a running Spring Boot application (on port 80 with an embedded Tomcat) on a CentOS7 server. (Server is running on Digital Ocean, it has an assigned domain, and works with simple http)</p>
  
  <p>I would like to switch it to <a href="https://something.com" rel="noreferrer">https://something.com</a>  </p>
  
  <p>All the tutorials suggest that I must have a .jks or a .p12 file for that, but I wasn't able to convert the .crt files to that. Beside I am not sure which of the 2 .crt file is the one I should convert to .jks/.p12.</p>
  
  <p>I have added this to my application.yaml, but didn't help:</p>
  
  <pre><code>server:    
    port: 443  
    ssl:  
      enabled: true  
      key-alias: server  
      key-store: "cert.crt"  
      key-store-password: "***"  
  </code></pre>
  
  <p>How can I change my running Spring Boot project to accept HTTPS queries using this certificate?</p>