Java SSL Certificate Cache - Clear

I am using Jenkins and I am just setting up a new Atlasian Stash git repository using HTTPS. I want to speak with Steisch and Jenkins (information on creating a report). They now prevent HTTPS from being used on the Stash instance.

An error occurred with the certificate (the wrong one was used, that is, a certificate for a different domain). This issue has been fixed, all clients can connect, including running curl / wget out of the box.

Jenkins runs on Ubuntu 14 with Jetty server connected.

Whenever jenkins tries to connect to git.int.company.com it throws the following error

javax.net.ssl.SSLException: hostname in certificate didn't match: <git.int.company.com> != <jira.int.company.com> OR <jira.int.compant.com> OR <www.jira.int.comapny.com>

      

It looks like Java has cached the certificate for git.int.company.com somewhere. I tried to restart jenkins by restarting the window with no luck. How do I clear the SSL certificate cache in Java / Jenkins / Jetty?

+3


source to share


2 answers


Now the bit is old, but on guessing you need to update the .csr mentioned in the truststore



https://serverfault.com/questions/392879/clearing-java-certificates-cache-force-reload-certificates

+1


source


I ran into this issue hostname in certificate didn't match

in Jenkins environment due to an outdated version of Maven whose HttpComponents dependencies do not work with SSL SNI certificates.



Once I updated Maven (presumably something better than Maven 3.2.5 should work) everything worked fine again.

+1


source







All Articles