title: HTTP Resteasy client SSL trust all certificate
body: <p>I searched any possible solution to trust all certificate using Resteasy client, but I could not find a single working solution. I'm beginning to think that there is no way to do this using Resteasy 2.2.1.</p>
  
  <p>Now, this is a sample of what I've done so far for a normal HTTP connection using resteasy client setting a proxy:</p>
  
  <pre class="lang-java prettyprint-override"><code>org.apache.commons.httpclient.HttpClient hc = new HttpClient();
  ApacheHttpClientExecutor ace;
  String proxyhost  = getProperty("proxyHost");
  Integer proxyport = getProperty("proxyPort", Integer.class);
  boolean useProxy = (proxyhost != null);
  if(useProxy){
      hc.getHostConfiguration().setProxy(proxyhost, proxyport);
      ace = new ApacheHttpClientExecutor(hc);
  } else {
      ace = new ApacheHttpClientExecutor();
  }
  ClientRequestFactory crf = new ClientRequestFactory(ace,uri);
  </code></pre>
  
  <p>Now, how can I tell to my <code>ClientRequestFactory</code> or my <code>ApacheHttpClientExecutor</code> or my <code>HttpClient</code> to trust all certificate?</p>
  
  <p>Beware: I'm using Resteasy 2.2.1 (JBoss 5.1) I can't migrate to JBoss 7 or use a different resteasy version so I can't accept any answer that uses <code>ResteasyClientBuilder</code></p>
  
  <p>I can already see the good guy that answer "<em>You shouldn't trust all certificate, it's evil!</em>". This is an HTTP client used for Integration test, so it's pointless to consider (at this test level) the SSL certificate. I will absolutely <strong>not</strong> do this in production.</p>