title: Disable camel certificate validation in Camel 2.12
body: <p>I have a requirement to temporarily disable certificate validation in Camel 2.12. I am referencing a test web service that is currently supplying an invalid certificate and getting the following exception -</p>
  
  <pre><code>Exception in route: sun.security.validator.ValidatorException: PKIX path building     failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  </code></pre>
  
  <p>Many of the example I've found on SO revolve around creating an HttpClientConfigurer and doing this -</p>
  
  <pre><code>        SSLContext ctx = SSLContext.getInstance("SSL"); 
          ctx.init(null, new TrustManager[] { tm }, null); 
  
          SSLSocketFactory ssf = new SSLSocketFactory(ctx, 
                  SSLSocketFactory.ALLOW_ALL_HOSTNAME_VERIFIER); 
          ClientConnectionManager ccm = client.getConnectionManager(); 
          SchemeRegistry sr = ccm.getSchemeRegistry(); 
          sr.register(new Scheme("https4", 443, ssf)); 
  </code></pre>
  
  <p>These solutions require a version of the <strong>configureHttpClient(HttpClient hc)</strong> method that takes an <strong>org.apache.http.client.HttpClient</strong>. In my Camel version, this method takes an <strong>org.apache.commons.httpclient.HttpClient</strong>, and has no reference to <strong>getConnectionManager()</strong>.</p>
  
  <p>I've tried the JVM setting <strong>com.sun.net.ssl.checkRevocation=false</strong>, but this has no effect.</p>