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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 5004001: Fix openssl build: convert hostname_ and port_ to HostPortPair (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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_openssl.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/socket/ssl_client_socket_openssl.cc
diff --git a/net/socket/ssl_client_socket_openssl.cc b/net/socket/ssl_client_socket_openssl.cc
index 936b346d7a6a853c52df085eca5163b74ec15a62..3f01db21b342cfdcb0181e56391a195ffe3bbeed 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -62,8 +62,7 @@ int MapOpenSSLError(int err) {
SSLClientSocketOpenSSL::SSLClientSocketOpenSSL(
ClientSocketHandle* transport_socket,
- const std::string& hostname,
- uint16 port,
+ const HostPortPair& host_and_port,
const SSLConfig& ssl_config)
: ALLOW_THIS_IN_INITIALIZER_LIST(buffer_send_callback_(
this, &SSLClientSocketOpenSSL::BufferSendComplete)),
@@ -80,8 +79,7 @@ SSLClientSocketOpenSSL::SSLClientSocketOpenSSL(
ssl_(NULL),
transport_bio_(NULL),
transport_(transport_socket),
- hostname_(hostname),
- port_(port),
+ host_and_port_(host_and_port),
ssl_config_(ssl_config),
completed_handshake_(false),
net_log_(transport_socket->socket()->NetLog()) {
@@ -101,7 +99,7 @@ bool SSLClientSocketOpenSSL::Init() {
return false;
}
- if (!SSL_set_tlsext_host_name(ssl_, hostname_.c_str())) {
+ if (!SSL_set_tlsext_host_name(ssl_, host_and_port_.host().c_str())) {
MaybeLogSSLError();
return false;
}
@@ -350,7 +348,7 @@ int SSLClientSocketOpenSSL::DoVerifyCert(int result) {
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_openssl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698