title: Default java cacerts don't work
body: <p>I've an SSL secured rest ws.</p>
  
  <p>In my java client I've added the certificat to the cacerts store, but it work only if i set explicitly the cacerts file path in the javax.net.ssl.trustStore  parameter and the password in javax.net.ssl.trustStorePassword.</p>
  
  <p>the java home is set to :
  java.home : C:\ide\jdk1.7.0_45\jre</p>
  
  <p>and the two parameters are set to :</p>
  
  <pre><code>  Properties pp = System.getProperties();
  
    Set&lt;Object&gt; s = pp.keySet();
  
    for (Object object : s) {
        System.out.println(object + " : " + pp.get(object));
    }
  
    System.setProperty("javax.net.ssl.trustStore", "C:\\ide\\jdk1.7.0_45\\jre\\bin\\cacerts");
    System.setProperty("javax.net.ssl.trustStorePassword", "secret");
  </code></pre>
  
  <p>result:</p>
  
  <pre><code>  java.runtime.name : Java(TM) SE Runtime Environment 
    sun.boot.library.path : C:\ide\jdk1.7.0_45\jre\bin
    .....
    java.home : C:\ide\jdk1.7.0_45\jre
    .... other java parameters value
    WS called with success
  </code></pre>
  
  <p>execution with Exception: </p>
  
  <pre><code>  Properties pp = System.getProperties();
  
    Set&lt;Object&gt; s = pp.keySet();
  
    for (Object object : s) {
        System.out.println(object + " : " + pp.get(object));
    }
  
    //System.setProperty("javax.net.ssl.trustStore", "C:\\ide\\jdk1.7.0_45\\jre\\bin\\cacerts");
    //System.setProperty("javax.net.ssl.trustStorePassword", "secret");
  </code></pre>
  
  <p>result :</p>
  
  <pre><code>java.runtime.name : Java(TM) SE Runtime Environment
  sun.boot.library.path : C:\ide\jdk1.7.0_45\jre\bin
  .....
  java.home : C:\ide\jdk1.7.0_45\jre
  .... other java parameters value
  Exception in thread "main" 
  Caused by: javax.net.ssl.SSLPeerUnverifiedException: peer not authenticated
  at sun.security.ssl.SSLSessionImpl.getPeerCertificates(SSLSessionImpl.java:397)
  at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:128)
  at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
  at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
  at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
  at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
  at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
  at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
  at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:754)
  at org.jboss.resteasy.client.core.executors.ApacheHttpClient4Executor.execute(ApacheHttpClient4Executor.java:182)
  at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:39)
  at org.jboss.resteasy.plugins.interceptors.encoding.AcceptEncodingGZIPInterceptor.execute(AcceptEncodingGZIPInterceptor.java:40)
  at org.jboss.resteasy.core.interception.ClientExecutionContextImpl.proceed(ClientExecutionContextImpl.java:45)
  at org.jboss.resteasy.client.ClientRequest.execute(ClientRequest.java:443)
  at org.jboss.resteasy.client.ClientRequest.httpMethod(ClientRequest.java:677)
  at org.jboss.resteasy.client.ClientRequest.post(ClientRequest.java:566)
  ... 2 more
  </code></pre>