title: Java SSL Certificate Cache - clear
body: <p>I'm using Jenkins and I just setup a new Atlassian Stash git repo using HTTPS. I want to get Stash and Jenkins talking (report build info). They dont now since enabling HTTPS on the Stash instance. </p>
  
  <p>There was an error with the certificate (the wrong one was being used - i.e. cert for a different domain). This problem was corrected, all clients can connect including running a curl/wget from the box. </p>
  
  <p>Jenkins is running on Ubuntu 14 with bundled Jetty server.</p>
  
  <p>Whenever jenkins tries to connect to git.int.company.com it throws the following error </p>
  
  <pre><code>javax.net.ssl.SSLException: hostname in certificate didn't match: &lt;git.int.company.com&gt; != &lt;jira.int.company.com&gt; OR &lt;jira.int.compant.com&gt; OR &lt;www.jira.int.comapny.com&gt;
  </code></pre>
  
  <p>This sounds like somewhere Java has cached the cert for git.int.company.com. I have tried restarting jenkins, restarting the box with no luck. How can I clear the SSL certificate cache in Java/Jenkins/Jetty?</p>