From: Ashutosh S. <ash...@gm...> - 2014-07-22 13:26:22
|
May be you need to try out the public key certificate from them. System.setProperty("javax.net.ssl.trustStore", "path/to/your/trustStore/relative to IBM WAS profile/file.jks"); System.setProperty("javax.net.ssl.trustStorePassword", "password"); File certFile = new File("path/to/your/trustStore/relative to IBM WAS profile/file.jks");//relative path. URL certURL = null; try { certURL = certFile.toURI().toURL(); } catch (MalformedURLException e1) { e1.printStackTrace(); } webClient.getOptions().setSSLClientCertificate(certURL, "password", "JKS");//"jks" or "pkcs12". the above code works fine for me. On Fri, Jul 4, 2014 at 9:00 AM, <le...@le...day> wrote: > Hi, > > Using HtmlUnit for Java, API version 2.15. > > Setting Proxy with: WebClient webClient = new > WebClient(BrowserVersion.CHROME, proxyIP, proxyPort); > > > Proxy works fine, get’s correct IP when getting response from > http://ipecho.net/plain > > If I try to get response from any URL with https://, I get 403 forbidden > error. > Using same proxy with a browser to same https:// URL works fine. > > Error when getPage() using https:// and proxy: > > -------------------------------------------------------------------- > Jul 04, 2014 8:47:19 PM com.gargoylesoftware.htmlunit.WebClient > printContentIfNecessary > INFO: statusCode=[403] contentType=[text/html] > Jul 04, 2014 8:47:19 PM com.gargoylesoftware.htmlunit.WebClient > printContentIfNecessary > INFO: <HTML><HEAD> > > <TITLE>Access Denied</TITLE> > > </HEAD> > > <BODY> > > <FONT face="Helvetica"> etc, etc... > > -------------------------------------------------------------------- > > Any ideas are appreciated, loving HtmlUnit so far. > > -Ole > > > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Htmlunit-user mailing list > Htm...@li... > https://lists.sourceforge.net/lists/listinfo/htmlunit-user > > -- With best Regards: Ashutosh Sharma |