| Index: net/socket/ssl_client_socket_mac.cc
|
| ===================================================================
|
| --- net/socket/ssl_client_socket_mac.cc (revision 65819)
|
| +++ net/socket/ssl_client_socket_mac.cc (working copy)
|
| @@ -16,6 +16,7 @@
|
| #include "base/string_util.h"
|
| #include "net/base/address_list.h"
|
| #include "net/base/cert_verifier.h"
|
| +#include "net/base/host_port_pair.h"
|
| #include "net/base/io_buffer.h"
|
| #include "net/base/net_errors.h"
|
| #include "net/base/net_log.h"
|
| @@ -517,6 +518,7 @@
|
|
|
| SSLClientSocketMac::SSLClientSocketMac(ClientSocketHandle* transport_socket,
|
| const std::string& hostname,
|
| + uint16 port,
|
| const SSLConfig& ssl_config)
|
| : handshake_io_callback_(this, &SSLClientSocketMac::OnHandshakeIOComplete),
|
| transport_read_callback_(this,
|
| @@ -525,6 +527,7 @@
|
| &SSLClientSocketMac::OnTransportWriteComplete),
|
| transport_(transport_socket),
|
| hostname_(hostname),
|
| + port_(port),
|
| ssl_config_(ssl_config),
|
| user_connect_callback_(NULL),
|
| user_read_callback_(NULL),
|
| @@ -742,8 +745,10 @@
|
| }
|
|
|
| // Now get the available client certs whose issuers are allowed by the server.
|
| - cert_request_info->host_and_port = hostname_;
|
| + cert_request_info->host_and_port = HostPortPair(hostname_, port_).ToString();
|
| cert_request_info->client_certs.clear();
|
| + // TODO(rch): we should consider passing a host-port pair as the first
|
| + // argument to X509Certificate::GetSSLClientCertificates.
|
| X509Certificate::GetSSLClientCertificates(hostname_,
|
| valid_issuers,
|
| &cert_request_info->client_certs);
|
| @@ -843,7 +848,7 @@
|
| std::string peer_id(hostname_);
|
| peer_id += std::string(reinterpret_cast<char*>(ai->ai_addr),
|
| ai->ai_addrlen);
|
| -
|
| + peer_id += port_;
|
| // SSLSetPeerID() treats peer_id as a binary blob, and makes its
|
| // own copy.
|
| status = SSLSetPeerID(ssl_context_, peer_id.data(), peer_id.length());
|
|
|