title: Selenium SSL Handshake Problem
body: <p>While attempting to access a test portal, I'm encountering the following problem while using the <code>selenium.start("captureNetworkTraffic=true");</code> mode.</p>
  
  <p>HTTP ERROR: 400</p>
  
  <pre><code>Could not proxy https://myurl.com
  java.lang.RuntimeException: Couldn't establish SSL handshake.  Try using trustAllSSLCertificates.
  sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
  
  RequestURI=/auth/login
  </code></pre>
  
  <p>Note that this happens only in the captureNetworkTrafficMode. A simple <code>selenium.start();</code> works with no problem at all. </p>
  
  <p>Here's the access code - </p>
  
  <pre><code>RemoteControlConfiguration settings = new RemoteControlConfiguration();
  File f = new File("C:\\selenium-profile");
  BrowserConfigurationOptions bco = new BrowserConfigurationOptions();
  bco.setCommandLineFlags("-trustAllSSLCertificates");
  bco.setCommandLineFlags("-disable-web-security");
  bco.setCommandLineFlags("-avoidProxy");
  settings.setFirefoxProfileTemplate(f);
  settings.setReuseBrowserSessions(true);
  settings.setSingleWindow(true);
  SeleniumServer seleniumserver=new SeleniumServer(settings);
  seleniumserver.boot();
  seleniumserver.start();
  selenium = new DefaultSelenium("localhost",4444,"*chrome","http://myurl.com") {
          public void open(String url) {
          commandProcessor.doCommand("open", new String[] {url,"true"});
                  }
              };
  selenium.start("captureNetworkTraffic=true");
  selenium.open("/");
  </code></pre>
  
  <p>This problem seems to have been beaten to death, but I still haven't come across a convincing solution...Most recommend the creation of a custom FF profile, but this doesn't work.</p>