title: How to Configure trusted SSL keystore with Spring boot?
body: <p>Want to introduce HTTPS protocol (trusted certificate) to my Spring Boot(1.3.2.RELEASE) application.
  For this purpose tried next SSL properties:</p>
  <pre><code>server.ssl.trust-store=classpath:key.jks
  server.ssl.trust-store-password=pass
  </code></pre>
  <p>and have the error:</p>
  <pre><code>Caused by: java.lang.IllegalArgumentException: Resource location must not be null
  at org.springframework.util.Assert.notNull(Assert.java:115) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
  at org.springframework.util.ResourceUtils.getURL(ResourceUtils.java:131) ~[spring-core-4.2.4.RELEASE.jar:4.2.4.RELEASE]
  at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.configureSslKeyStore(TomcatEmbeddedServletContainerFactory.java:340) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
  at org.springframework.boot.context.embedded.tomcat.TomcatEmbeddedServletContainerFactory.configureSsl(TomcatEmbeddedServletContainerFactory.java:323) ~[spring-boot-1.3.2.RELEASE.jar:1.3.2.RELEASE]
  </code></pre>
  <p>In that error you can see that <strong>configureSslKeyStore</strong> should be passed.
  When I am trying to launch the application with next set of changes:</p>
  <pre><code>server.ssl.key-store=classpath:key.jks
  server.ssl.key-store-password=pass
  server.ssl.trust-store=classpath:key.jks
  server.ssl.trust-store-password=pass
  </code></pre>
  <p>Application starts successfully but https is not reachable:
  <a href="https://i.stack.imgur.com/hel0r.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/hel0r.png" alt="enter image description here" /></a></p>
  <p>So now I have several questions:</p>
  <ul>
  <li>What can be the reason of such behavior, that protocol is unsupported?(Certificate is fresh and not outdated)</li>
  <li>Is it correctly that there is no way to configure trusted certificate without redundant properties?</li>
  <li>Is there some other more convenient way to configure trusted
  SSL?</li>
  </ul>
  <p><strong>UPDATE:</strong></p>
  <p>It is JAR file and certificate exists inside of it classpath:key.jks&quot;&quot;.</p>