From fd3a7df6c4caaeceb8402daa2c1b357c7f78331f Mon Sep 17 00:00:00 2001 From: "rch@chromium.org" Date: Thu, 7 Oct 2010 23:18:36 +0000 Subject: Add a hostname parameter to HttpStreamRequest::GenerateSslParams so that when we create an SSL connection to an HTTPS proxy, we do not attempt to compare the hostname of the request URL with the hostname in the proxy's certificate. BUG=none TEST=none Review URL: http://codereview.chromium.org/3547017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@61876 0039d316-1c4b-4281-b951-d872f2087c98 --- net/http/http_stream_request.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'net/http/http_stream_request.cc') diff --git a/net/http/http_stream_request.cc b/net/http/http_stream_request.cc index 35b2145..59a7e8c 100644 --- a/net/http/http_stream_request.cc +++ b/net/http/http_stream_request.cc @@ -513,6 +513,7 @@ int HttpStreamRequest::DoInitConnection() { // Set ssl_params, and unset proxy_tcp_params ssl_params = GenerateSslParams(proxy_tcp_params, NULL, NULL, ProxyServer::SCHEME_DIRECT, + proxy_host_port->host(), want_spdy_over_npn); proxy_tcp_params = NULL; } @@ -549,6 +550,7 @@ int HttpStreamRequest::DoInitConnection() { scoped_refptr ssl_params = GenerateSslParams(tcp_params, http_proxy_params, socks_params, proxy_info()->proxy_server().scheme(), + request_info().url.HostNoBrackets(), want_spdy_over_npn); SSLClientSocketPool* ssl_pool = NULL; if (proxy_info()->is_direct()) @@ -792,6 +794,7 @@ scoped_refptr HttpStreamRequest::GenerateSslParams( scoped_refptr http_proxy_params, scoped_refptr socks_params, ProxyServer::Scheme proxy_scheme, + std::string hostname, bool want_spdy_over_npn) { if (factory_->IsTLSIntolerantServer(request_info().url)) { @@ -817,7 +820,7 @@ scoped_refptr HttpStreamRequest::GenerateSslParams( scoped_refptr ssl_params = new SSLSocketParams(tcp_params, socks_params, http_proxy_params, - proxy_scheme, request_info().url.HostNoBrackets(), + proxy_scheme, hostname, *ssl_config(), load_flags, force_spdy_always_ && force_spdy_over_ssl_, want_spdy_over_npn); -- cgit v1.1