[prev in list] [next in list] [prev in thread] [next in thread] 

List:       htmlunit-develop
Subject:    [HtmlUnit] [htmlunit:bugs] #1790 javax.net.ssl.SSLHandshakeException: Received fatal alert:
From:       "Ahmed Ashour" <asashour () users ! sf ! net>
Date:       2016-05-26 9:39:25
Message-ID: /p/htmlunit/bugs/1790/245618271d911acdd28de2630a68b09db69178fc.bugs () htmlunit ! p ! sourceforge ! net
[Download RAW message or body]

[Attachment #2 (multipart/related)]


--===============5053897726633677769==
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit

- **status**: pending --> closed
- **assigned_to**: Ahmed Ashour



---

** [bugs:#1790] javax.net.ssl.SSLHandshakeException: Received fatal alert: \
handshake_failure**

**Status:** closed
**Group:** 2.15
**Labels:** handshake 
**Created:** Thu May 26, 2016 06:42 AM UTC by qiang tang
**Last Updated:** Thu May 26, 2016 08:19 AM UTC
**Owner:** Ahmed Ashour


Hello,

I got SSLHandshakeException with the version htmlunit-2.14 as follow, Cloud you help \
to find out the root reason?

JDK: 1.7.0_75

Exception message:
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)
	at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)
	at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)
	at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)
	at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)
	at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)
	at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)
  at org.apache.http.impl.conn.HttpClientConnectionOperator.upgrade(HttpClientConnectionOperator.java:167)
  at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:329)
  at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:398)
  at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)
	at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)
	at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)
	at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)
	at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)
  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
  at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:179)
  at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1297)
  at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1214)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394)
	at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379)
	at Test.main(Test.java:30)
    
Java Code:

~~~
public class Test {
    public static void main(String[] args){
        WebClient webClient = new WebClient(BrowserVersion.INTERNET_EXPLORER_11);

        // for local testing
        ProxyConfig proxyConfig = new ProxyConfig();
        proxyConfig.setProxyHost("cdc-s-tmg1");
        proxyConfig.setProxyPort(8080);
        webClient.getOptions().setProxyConfig(proxyConfig);

        webClient.getOptions().setPrintContentOnFailingStatusCode(false);
        webClient.getOptions().setThrowExceptionOnScriptError(false);
        webClient.getOptions().setUseInsecureSSL(true);
        webClient.getOptions().setRedirectEnabled(true);


        String Url = "https://wfr.partnersonline.com/ibi_apps/WFServlet.ibfs";

        Log.debug("Login target web site with Url:" + Url);
        try {
            HtmlPage page = webClient.getPage(Url);
        } catch (Exception e) {
            e.printStackTrace();
        }finally{
            webClient.closeAllWindows();
        }
    }
}
~~~



---

Sent from sourceforge.net because htmlunit-develop@lists.sourceforge.net is \
subscribed to https://sourceforge.net/p/htmlunit/bugs/

To unsubscribe from further messages, a project admin can change settings at \
https://sourceforge.net/p/htmlunit/admin/bugs/options.  Or, if this is a mailing \
                list, you can unsubscribe from the mailing list.
--===============5053897726633677769==
MIME-Version: 1.0
Content-Type: text/html; charset="us-ascii"
Content-Transfer-Encoding: 7bit

<div class="markdown_content"><ul>
<li><strong>status</strong>: pending --&gt; closed</li>
<li><strong>assigned_to</strong>: Ahmed Ashour</li>
</ul>
<hr/>
<p><strong> <a class="alink strikethrough" \
href="https://sourceforge.net/p/htmlunit/bugs/1790/">[bugs:#1790]</a> \
javax.net.ssl.SSLHandshakeException: Received fatal alert: \
handshake_failure</strong></p> <p><strong>Status:</strong> closed<br/>
<strong>Group:</strong> 2.15<br/>
<strong>Labels:</strong> handshake <br/>
<strong>Created:</strong> Thu May 26, 2016 06:42 AM UTC by qiang tang<br/>
<strong>Last Updated:</strong> Thu May 26, 2016 08:19 AM UTC<br/>
<strong>Owner:</strong> Ahmed Ashour</p>
<p>Hello,</p>
<p>I got SSLHandshakeException with the version htmlunit-2.14 as follow, Cloud you \
help to find out the root reason?</p> <p>JDK: 1.7.0_75</p>
<p>Exception message:<br/>
javax.net.ssl.SSLHandshakeException: Received fatal alert: handshake_failure<br/>
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:192)<br/>
    at sun.security.ssl.Alerts.getSSLException(Alerts.java:154)<br/>
    at sun.security.ssl.SSLSocketImpl.recvAlert(SSLSocketImpl.java:1979)<br/>
    at sun.security.ssl.SSLSocketImpl.readRecord(SSLSocketImpl.java:1086)<br/>
    at sun.security.ssl.SSLSocketImpl.performInitialHandshake(SSLSocketImpl.java:1332)<br/>
  at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1359)<br/>
    at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:1343)<br/>
    at org.apache.http.conn.ssl.SSLConnectionSocketFactory.createLayeredSocket(SSLConnectionSocketFactory.java:275)<br/>
  at org.apache.http.impl.conn.HttpClientConnectionOperator.upgrade(HttpClientConnectionOperator.java:167)<br/>
  at org.apache.http.impl.conn.PoolingHttpClientConnectionManager.upgrade(PoolingHttpClientConnectionManager.java:329)<br/>
  at org.apache.http.impl.execchain.MainClientExec.establishRoute(MainClientExec.java:398)<br/>
  at org.apache.http.impl.execchain.MainClientExec.execute(MainClientExec.java:219)<br/>
  at org.apache.http.impl.execchain.ProtocolExec.execute(ProtocolExec.java:195)<br/>
    at org.apache.http.impl.execchain.RetryExec.execute(RetryExec.java:85)<br/>
    at org.apache.http.impl.execchain.RedirectExec.execute(RedirectExec.java:108)<br/>
  at org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:186)<br/>
  at org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)<br/>
  at com.gargoylesoftware.htmlunit.HttpWebConnection.getResponse(HttpWebConnection.java:179)<br/>
  at com.gargoylesoftware.htmlunit.WebClient.loadWebResponseFromWebConnection(WebClient.java:1297)<br/>
  at com.gargoylesoftware.htmlunit.WebClient.loadWebResponse(WebClient.java:1214)<br/>
  at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:325)<br/>
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:394)<br/>
    at com.gargoylesoftware.htmlunit.WebClient.getPage(WebClient.java:379)<br/>
    at Test.main(Test.java:30)</p>
<p>Java Code:</p>
<div class="codehilite"><pre><span class="nt">public</span> <span \
class="nt">class</span> <span class="nt">Test</span> <span class="p">{</span>  <span \
class="n">public</span> <span class="k">static</span> <span class="n">void</span> \
<span class="n">main</span><span class="p">(</span><span class="n">String</span><span \
class="cp">[]</span> <span class="n">args</span><span class="p">)</span><span \
class="err">{</span>  <span class="n">WebClient</span> <span \
class="n">webClient</span> <span class="o">=</span> <span class="n">new</span> <span \
class="n">WebClient</span><span class="p">(</span><span \
class="n">BrowserVersion</span><span class="o">.</span><span \
class="n">INTERNET_EXPLORER_11</span><span class="p">);</span>

        <span class="o">//</span> <span class="n">for</span> <span \
class="n">local</span> <span class="n">testing</span>  <span \
class="n">ProxyConfig</span> <span class="n">proxyConfig</span> <span \
class="o">=</span> <span class="n">new</span> <span class="n">ProxyConfig</span><span \
class="p">();</span>  <span class="n">proxyConfig</span><span class="o">.</span><span \
class="n">setProxyHost</span><span class="p">(</span><span \
class="s2">"cdc-s-tmg1"</span><span class="p">);</span>  <span \
class="n">proxyConfig</span><span class="o">.</span><span \
class="n">setProxyPort</span><span class="p">(</span><span class="m">8080</span><span \
class="p">);</span>  <span class="n">webClient</span><span class="o">.</span><span \
class="n">getOptions</span><span class="p">()</span><span class="o">.</span><span \
class="n">setProxyConfig</span><span class="p">(</span><span \
class="n">proxyConfig</span><span class="p">);</span>

        <span class="n">webClient</span><span class="o">.</span><span \
class="n">getOptions</span><span class="p">()</span><span class="o">.</span><span \
class="n">setPrintContentOnFailingStatusCode</span><span class="p">(</span><span \
class="n">false</span><span class="p">);</span>  <span \
class="n">webClient</span><span class="o">.</span><span \
class="n">getOptions</span><span class="p">()</span><span class="o">.</span><span \
class="n">setThrowExceptionOnScriptError</span><span class="p">(</span><span \
class="n">false</span><span class="p">);</span>  <span \
class="n">webClient</span><span class="o">.</span><span \
class="n">getOptions</span><span class="p">()</span><span class="o">.</span><span \
class="n">setUseInsecureSSL</span><span class="p">(</span><span \
class="n">true</span><span class="p">);</span>  <span class="n">webClient</span><span \
class="o">.</span><span class="n">getOptions</span><span class="p">()</span><span \
class="o">.</span><span class="n">setRedirectEnabled</span><span \
class="p">(</span><span class="n">true</span><span class="p">);</span>

        <span class="n">String</span> <span class="n">Url</span> <span \
class="o">=</span> <span \
class="s2">"https://wfr.partnersonline.com/ibi_apps/WFServlet.ibfs"</span><span \
class="p">;</span>

        <span class="n">Log</span><span class="o">.</span><span \
class="n">debug</span><span class="p">(</span><span class="s2">"Login target web site \
with Url:"</span> <span class="o">+</span> <span class="n">Url</span><span \
class="p">);</span>  <span class="n">try</span> <span class="err">{</span>
            <span class="n">HtmlPage</span> <span class="k">page</span> <span \
class="o">=</span> <span class="n">webClient</span><span class="o">.</span><span \
class="n">getPage</span><span class="p">(</span><span class="n">Url</span><span \
class="p">);</span>  <span class="p">}</span> <span class="nt">catch</span> <span \
class="o">(</span><span class="nt">Exception</span> <span class="nt">e</span><span \
                class="o">)</span> <span class="p">{</span>
            <span class="n">e</span><span class="o">.</span><span \
                class="n">printStackTrace</span><span class="p">();</span>
        <span class="p">}</span><span class="nt">finally</span><span \
                class="p">{</span>
            <span class="n">webClient</span><span class="o">.</span><span \
class="n">closeAllWindows</span><span class="p">();</span>  <span class="p">}</span>
    <span class="err">}</span>
<span class="err">}</span>
</pre></div>


<hr/>
<p>Sent from sourceforge.net because htmlunit-develop@lists.sourceforge.net is \
subscribed to <a href="https://sourceforge.net/p/htmlunit/bugs/">https://sourceforge.net/p/htmlunit/bugs/</a></p>
 <p>To unsubscribe from further messages, a project admin can change settings at <a \
href="https://sourceforge.net/p/htmlunit/admin/bugs/options.">https://sourceforge.net/p/htmlunit/admin/bugs/options.</a> \
                Or, if this is a mailing list, you can unsubscribe from the mailing \
                list.</p></div>
--===============5053897726633677769==--



------------------------------------------------------------------------------
Mobile security can be enabling, not merely restricting. Employees who
bring their own devices (BYOD) to work are irked by the imposition of MDM
restrictions. Mobile Device Manager Plus allows you to control only the
apps on BYO-devices by containerizing them, leaving personal data untouched!
https://ad.doubleclick.net/ddm/clk/304595813;131938128;j

_______________________________________________
HtmlUnit-develop mailing list
HtmlUnit-develop@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/htmlunit-develop


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic