| Index: net/socket/ssl_client_socket_win.cc
|
| diff --git a/net/socket/ssl_client_socket_win.cc b/net/socket/ssl_client_socket_win.cc
|
| index 38bdfce514ccd0d876417b7620faf37e267d9409..13f3c659d28fcbc3a746bdab8092156f6f20c212 100644
|
| --- a/net/socket/ssl_client_socket_win.cc
|
| +++ b/net/socket/ssl_client_socket_win.cc
|
| @@ -331,7 +331,7 @@ class ClientCertStore {
|
| static const int kRecvBufferSize = (5 + 16*1024 + 64);
|
|
|
| SSLClientSocketWin::SSLClientSocketWin(ClientSocketHandle* transport_socket,
|
| - const std::string& hostname,
|
| + const HostPortPair& host_port_pair,
|
| const SSLConfig& ssl_config)
|
| : ALLOW_THIS_IN_INITIALIZER_LIST(
|
| handshake_io_callback_(this,
|
| @@ -341,7 +341,7 @@ SSLClientSocketWin::SSLClientSocketWin(ClientSocketHandle* transport_socket,
|
| ALLOW_THIS_IN_INITIALIZER_LIST(
|
| write_callback_(this, &SSLClientSocketWin::OnWriteComplete)),
|
| transport_(transport_socket),
|
| - hostname_(hostname),
|
| + host_port_pair_(host_port_pair),
|
| ssl_config_(ssl_config),
|
| user_connect_callback_(NULL),
|
| user_read_callback_(NULL),
|
| @@ -413,7 +413,7 @@ void SSLClientSocketWin::GetSSLInfo(SSLInfo* ssl_info) {
|
|
|
| void SSLClientSocketWin::GetSSLCertRequestInfo(
|
| SSLCertRequestInfo* cert_request_info) {
|
| - cert_request_info->host_and_port = hostname_; // TODO(wtc): no port!
|
| + cert_request_info->host_and_port = host_port_pair_.ToString();
|
| cert_request_info->client_certs.clear();
|
|
|
| // Get the certificate_authorities field of the CertificateRequest message.
|
| @@ -559,7 +559,9 @@ int SSLClientSocketWin::InitializeSSLContext() {
|
| status = InitializeSecurityContext(
|
| creds_,
|
| NULL, // NULL on the first call
|
| - const_cast<wchar_t*>(ASCIIToWide(hostname_).c_str()),
|
| + // TODO(davidben): Different ports on the same host to share a cache. It
|
| + // may be worth keying the port into the CredHandle to separate them.
|
| + const_cast<wchar_t*>(ASCIIToWide(host_port_pair_.host()).c_str()),
|
| flags,
|
| 0, // Reserved
|
| SECURITY_NATIVE_DREP, // TODO(wtc): MSDN says this should be set to 0.
|
| @@ -1026,7 +1028,7 @@ int SSLClientSocketWin::DoVerifyCert() {
|
| if (ssl_config_.verify_ev_cert)
|
| flags |= X509Certificate::VERIFY_EV_CERT;
|
| verifier_.reset(new CertVerifier);
|
| - return verifier_->Verify(server_cert_, hostname_, flags,
|
| + return verifier_->Verify(server_cert_, host_port_pair_.host(), flags,
|
| &server_cert_verify_result_,
|
| &handshake_io_callback_);
|
| }
|
|
|