hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "John Vasileff (JIRA)" <j...@apache.org>
Subject [jira] [Comment Edited] (HTTPCLIENT-1119) Server Name Indication (SNI) Support
Date Fri, 15 Feb 2013 19:13:13 GMT

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

John Vasileff edited comment on HTTPCLIENT-1119 at 2/15/13 7:12 PM:
--------------------------------------------------------------------

Will - I think your comment about switching out the hostname verifier makes sense. Without
SNI, by the time hostname verification is attempted we have already been sent the _wrong_
certificate. So hacking a verifier to claim the wrong certificate is ok would be the wrong
thing to do. I am not familiar with the codebase, but it looks like the patch above does the
right thing by adding a "HostNameSetter". The web server may have several certificates, it
just needs SNI to help it decide which one to send the client.

Edit - looking at it again, I guess the verifier executes _immediately_ after the HostNameSetter
code in the patch anyway. So I guess the setter code could go in a custom verifier.
                
      was (Author: jvasileff):
    Will - I think your comment about switching out the hostname verifier makes sense. Without
SNI, by the time hostname verification is attempted we have already been sent the _wrong_
certificate. So hacking a verifier to claim the wrong certificate is ok would be the wrong
thing to do. I am not familiar with the codebase, but it looks like the patch above does the
right thing by adding a "HostNameSetter". The web server may have several certificates, it
just needs SNI to help it decide which one to send the client.
                  
> 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


Mime
View raw message