hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Oleg Kalnichevski (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (HTTPCLIENT-996) SSL does not seem to work at all
Date Tue, 14 Sep 2010 20:42:35 GMT

     [ https://issues.apache.org/jira/browse/HTTPCLIENT-996?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Oleg Kalnichevski resolved HTTPCLIENT-996.
------------------------------------------

    Resolution: Fixed

The issue has been fixed in the 4.0.x branch. Please pull the latest snapshot off the branch
[1] and re-test your application with it.

As a temporary solution the problem can be worked around by downgrading to 4.0.1 or by configuring
the SSL socket factory to use the AllowAllHostnameVerifier [2]

Oleg

[1] http://svn.apache.org/repos/asf/httpcomponents/httpcore/branches/4.0.x/
[2] http://hc.apache.org/httpcomponents-client-ga/tutorial/html/connmgmt.html#d4e506

> SSL does not seem to work at all
> --------------------------------
>
>                 Key: HTTPCLIENT-996
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-996
>             Project: HttpComponents HttpClient
>          Issue Type: Bug
>          Components: HttpClient
>    Affects Versions: 4.0.2
>         Environment: Linux
>            Reporter: Oliver Siegmar
>            Priority: Critical
>             Fix For: 4.0.3
>
>
> Whenever I try to request content via https I get this exception:
> Exception in thread "main" javax.net.ssl.SSLException: hostname in certificate didn't
match: <140.211.11.131> != <*.apache.org>
> 	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:220)
> 	at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
> 	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:149)
> 	at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:130)
> 	at org.apache.http.conn.ssl.SSLSocketFactory.createSocket(SSLSocketFactory.java:399)
> 	at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:143)
> 	at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
> 	at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:108)
> 	at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:415)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:641)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:576)
> 	at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:554)
> 	at HttpsTest.fails(HttpsTest.java:25)
> 	at HttpsTest.main(HttpsTest.java:12)
> I can reproduce this whith the following code:
> import org.apache.http.client.HttpClient;
> import org.apache.http.client.methods.HttpGet;
> import org.apache.http.impl.client.DefaultHttpClient;
> public class HttpsTest {
>     public static void main(final String[] args) throws Exception {
>         final HttpClient client = new DefaultHttpClient();
>         final HttpGet req = new HttpGet("https://www.apache.org");
>         client.execute(req);
>     }
> }

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@hc.apache.org
For additional commands, e-mail: dev-help@hc.apache.org


Mime
View raw message