title: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated in Tomcat with Apache HttpClient
body: <p>When trying to use Apache HttpClient 4.x on OpenJDK 1.7.0 on Ubuntu inside Tomcat, I get an</p>
  
  <pre><code>         javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
  </code></pre>
  
  <p>exception. When using the same JDK with an basic HTTPS connection like</p>
  
  <pre><code>         url = new URL(https_url);
           HttpsURLConnection con = (HttpsURLConnection)url.openConnection();
  </code></pre>
  
  <p>it works and I get an connection and can read the content.</p>
  
  <p>I have followed dozens of answers on stackoverflow, googled for some days and all suggest to import the cert into the keystore. I've done this, the problem persists. And it sounds strange to be my problem, as the basic connection with HttpsURLConnection works, but with HttpClient 4.x it doesn't.</p>