title: HtmlUnit connecting to https
body: <p>I encounter a problem when I want to use HtmlUnit (version 2.10) with an https website.</p>
  
  <p>I have initialize an WebClient Object and I have specify some parameters.</p>
  
  <pre><code>webClient.setSSLClientCertificate(URL,PASSWORD,"pkcs12");
  webClient.setUseInsecureSSL(true);
  </code></pre>
  
  <p>The setUseInsecureSSL method throws an IllegalArgumentException with this message : "Socket factory may not be null"</p>
  
  <h2>Stack trace</h2>
  
  <blockquote>
    <p>org.apache.http.conn.scheme.Scheme.(Scheme.java:94)
    com.gargoylesoftware.htmlunit.HttpWebConnection.createHttpClient(HttpWebConnection.java:535)
    com.gargoylesoftware.htmlunit.HttpWebConnection.getHttpClient(HttpWebConnection.java:500)
    com.gargoylesoftware.htmlunit.HttpWebConnection.setUseInsecureSSL(HttpWebConnection.java:711)
    com.gargoylesoftware.htmlunit.WebClient.setUseInsecureSSL(WebClient.java:1096)
    mon.package.HtmlUnitAbstract.setSSLClientCertificate(HtmlUnitAbstract.java:66)</p>
  </blockquote>
  
  <p>Someone already had this type of error ?
  Thanks for your help.</p>