hc-httpclient-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fang Lin <Fang...@u.washington.edu>
Subject RE: HttpClient 4.1.2 hostname in certificate didn't match
Date Tue, 09 Aug 2011 17:04:57 GMT
Thank you, Oleg!

I was using: Scheme(String name, SocketFactory factory, int port).
Changed to Scheme(String name, int port, SchemeSocketFactory factory), problem solved.


-----Original Message-----
From: Oleg Kalnichevski [mailto:olegk@apache.org] 
Sent: Tuesday, August 09, 2011 4:29 AM
To: HttpClient User Discussion
Subject: Re: HttpClient 4.1.2 hostname in certificate didn't match

On Mon, 2011-08-08 at 21:39 +0000, Fang Lin wrote:
> With the httpclient 4.1.2., we got javax.net.ssl.SSLException: 
> hostname in certificate didn't match: <name.cs.washington.edu/128.208....> != <*.cs.washington.edu>
OR <*.cs.washington.edu> OR <cs.washington.edu>
>         at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:228)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.ssl.BrowserCompatHostnameVerifier.verify(BrowserCompatHostnameVerifier.java:54)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:149)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:130)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:397)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.ssl.SSLSocketFactory.connectSocket(SSLSocketFactory.java:495)
~[httpclient.jar:4.1.2]
>         at org.apache.http.conn.scheme.SchemeSocketFactoryAdaptor.connectSocket(SchemeSocketFactoryAdaptor.java:62)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:148)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.conn.AbstractPoolEntry.open(AbstractPoolEntry.java:149)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.conn.AbstractPooledConnAdapter.open(AbstractPooledConnAdapter.java:121)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.client.DefaultRequestDirector.tryConnect(DefaultRequestDirector.java:573)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.client.DefaultRequestDirector.execute(DefaultRequestDirector.java:425)
~[httpclient.jar:4.1.2]
>         at org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpClient.java:820)
~[httpclient.jar:4.1.2]
>         at 
> org.apache.http.impl.client.AbstractHttpClient.execute(AbstractHttpCli
> ent.java:776) ~[httpclient.jar:4.1.2]
> 
> Switched back to httpclient 4.1.1, the problem goes away.

Make sure to not use deprecated methods when creating SchemeRegistry objects.

Oleg  


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

Mime
View raw message