title: Spring Boot - Enable SSL (HTTPS) with CA certificate
body: <p>Maybe I will find help here. I want to enable SSL on Spring Boot application. I have a configuration like:</p>
  
  <blockquote>
    <p>server:   port: 8999   ssl:
        enabled: true
        key-store: classpath:keystore.jks
        key-store-password: mypass
        key-password: mypass</p>
  </blockquote>
  
  <p>The problem is my keystore. I've imported *crt file into keystore with alias 'tomcat':</p>
  
  <pre><code>keytool -importcert -file certificate.crt -keystore native.jks -alias tomcat
  </code></pre>
  
  <p>However, I still can't properly access my rest api. It vomits with error in firefox: </p>
  
  <blockquote>
    <p>SSL_ERROR_RX_RECORD_TOO_LONG </p>
  </blockquote>
  
  <ul>
  <li>it doesn't work. How can I make proper keystore to make it work? I'm issuing with CA certificate, NOT self-signed. I have files like: </li>
  </ul>
  
  <blockquote>
    <p>certificate.crt, certificate.p12, certificate.pk, privkey.pem and
    three files root_ca_1.ca-bundle, root_ca_2.ca-bundle,
    root_ca_3.ca-bundle</p>
  </blockquote>
  
  <p>. That's all I have. I'm very fresh with ssl topic, just read some tutorials and tried few keytool commands to make it work. I'd be grateful for help. Thank You in advance.</p>