summaryrefslogtreecommitdiffstats
path: root/net
diff options
context:
space:
mode:
authorrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:18:36 +0000
committerrch@chromium.org <rch@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-10-07 23:18:36 +0000
commitfd3a7df6c4caaeceb8402daa2c1b357c7f78331f (patch)
tree0c0c3ab126a1601e4f364c42efbb473068c7d4af /net
parentf78475dbe35a34f8756bc38be1066677e46cbd32 (diff)
downloadchromium_src-fd3a7df6c4caaeceb8402daa2c1b357c7f78331f.zip
chromium_src-fd3a7df6c4caaeceb8402daa2c1b357c7f78331f.tar.gz
chromium_src-fd3a7df6c4caaeceb8402daa2c1b357c7f78331f.tar.bz2
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
Diffstat (limited to 'net')
-rw-r--r--net/http/http_stream_request.cc5
-rw-r--r--net/http/http_stream_request.h1
2 files changed, 5 insertions, 1 deletions
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<SSLSocketParams> 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<SSLSocketParams> HttpStreamRequest::GenerateSslParams(
scoped_refptr<HttpProxySocketParams> http_proxy_params,
scoped_refptr<SOCKSSocketParams> 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<SSLSocketParams> HttpStreamRequest::GenerateSslParams(
scoped_refptr<SSLSocketParams> 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);
diff --git a/net/http/http_stream_request.h b/net/http/http_stream_request.h
index 10e6525..5a3ccb7 100644
--- a/net/http/http_stream_request.h
+++ b/net/http/http_stream_request.h
@@ -119,6 +119,7 @@ class HttpStreamRequest : public StreamFactory::StreamRequestJob {
scoped_refptr<HttpProxySocketParams> http_proxy_params,
scoped_refptr<SOCKSSocketParams> socks_params,
ProxyServer::Scheme proxy_scheme,
+ std::string hostname,
bool want_spdy_over_npn);
// AlternateProtocol API