Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1464)

Unified Diff: net/socket/ssl_client_socket_win.cc

Issue 4339001: Correctly handle SSL Client Authentication requests when connecting... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Addressing eroman's feedback Created 10 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_win.cc
===================================================================
--- net/socket/ssl_client_socket_win.cc (revision 65819)
+++ net/socket/ssl_client_socket_win.cc (working copy)
@@ -15,6 +15,7 @@
#include "base/utf_string_conversions.h"
#include "net/base/cert_verifier.h"
#include "net/base/connection_type_histograms.h"
+#include "net/base/host_port_pair.h"
#include "net/base/io_buffer.h"
#include "net/base/net_log.h"
#include "net/base/net_errors.h"
@@ -371,7 +372,7 @@
static const int kRecvBufferSize = (5 + 16*1024 + 64);
SSLClientSocketWin::SSLClientSocketWin(ClientSocketHandle* transport_socket,
- const std::string& hostname,
+ const HostPortPair& host_and_port,
const SSLConfig& ssl_config)
: ALLOW_THIS_IN_INITIALIZER_LIST(
handshake_io_callback_(this,
@@ -381,7 +382,7 @@
ALLOW_THIS_IN_INITIALIZER_LIST(
write_callback_(this, &SSLClientSocketWin::OnWriteComplete)),
transport_(transport_socket),
- hostname_(hostname),
+ host_and_port_(host_and_port),
ssl_config_(ssl_config),
user_connect_callback_(NULL),
user_read_callback_(NULL),
@@ -453,7 +454,7 @@
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_and_port_.ToString();
cert_request_info->client_certs.clear();
// Get the certificate_authorities field of the CertificateRequest message.
@@ -601,7 +602,7 @@
status = InitializeSecurityContext(
creds_,
NULL, // NULL on the first call
- const_cast<wchar_t*>(ASCIIToWide(hostname_).c_str()),
+ const_cast<wchar_t*>(ASCIIToWide(host_and_port_.host()).c_str()),
flags,
0, // Reserved
0, // Not used with Schannel.
@@ -1123,7 +1124,7 @@
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_and_port_.host(), flags,
&server_cert_verify_result_,
&handshake_io_callback_);
}
« no previous file with comments | « net/socket/ssl_client_socket_win.h ('k') | net/socket/tcp_client_socket_pool_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698