You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@hc.apache.org by "Oleg Kalnichevski (JIRA)" <ji...@apache.org> on 2013/03/09 16:49:13 UTC

[jira] [Commented] (HTTPCLIENT-1119) Server Name Indication (SNI) Support

    [ https://issues.apache.org/jira/browse/HTTPCLIENT-1119?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13597984#comment-13597984 ] 

Oleg Kalnichevski commented on HTTPCLIENT-1119:
-----------------------------------------------

SNI support in Java 7 and Java 8 looks like a complete bloody mess. The proposed hack would likely work with Java 7 only and in blocking mode only. I found no way of setting a virtual host name on non-blocking SSLEngine in Java 7. As a result with the proposed hack SNI would only work with HttpClient and not with HttpAsyncClient. Quite frankly this sucks. To make matters worse Java 8 has a completely different SNI API provided out of javax.net.ssl package. If we want to make SNI work on Java 8 we will have to resort to yet another reflection hack.

Oleg
                
> Server Name Indication (SNI) Support
> ------------------------------------
>
>                 Key: HTTPCLIENT-1119
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1119
>             Project: HttpComponents HttpClient
>          Issue Type: Improvement
>          Components: HttpClient
>            Reporter: Gus Power
>              Labels: sni, ssl, tls, vhost
>             Fix For: Future
>
>         Attachments: HTTPCLIENT-1119-support-SNI-on-Java-7-via-setHost-of.patch
>
>
> Provide support for Server Name Indication (SNI) support as per RFC 3546 (section 3.1).
> Currently attempting to connect to SNI enabled host 'expectedhost' over SSL using http client results in an SSLException similar to:
> javax.net.ssl.SSLException: hostname in certificate didn't match: <expectedhost> != <defaulthost>
>   at org.apache.http.conn.ssl.AbstractVerifier.verify(AbstractVerifier.java:220)
> We use SNI on some of our environments and were trying to use httpclient to automatically test host access and availability.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

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