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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 816543004: Update from https://crrev.com/308996 (Closed) Base URL: git@github.com:domokit/mojo.git@master
Patch Set: Created 6 years 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_nss.cc ('k') | net/socket/ssl_session_cache_openssl.cc » ('j') | 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 c78a9742bf8324c3cc1d8e138c7e04589b89e4f7..74ac8fc7a7a577ca268e217545f85e2d82437260 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -927,12 +927,12 @@ int SSLClientSocketOpenSSL::DoHandshake() {
int net_error = OK;
int rv = SSL_do_handshake(ssl_);
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
- tracked_objects::ScopedTracker tracking_profile2(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "424386 SSLClientSocketOpenSSL::DoHandshake2"));
-
if (client_auth_cert_needed_) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::DoHandshake2"));
+
net_error = ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
// If the handshake already succeeded (because the server requests but
// doesn't require a client cert), we need to invalidate the SSL session
@@ -948,6 +948,11 @@ int SSLClientSocketOpenSSL::DoHandshake() {
}
}
} else if (rv == 1) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile3(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::DoHandshake3"));
+
if (trying_cached_session_ && logging::DEBUG_MODE) {
DVLOG(2) << "Result of session reuse for " << host_and_port_.ToString()
<< " is: " << (SSL_session_reused(ssl_) ? "Success" : "Fail");
@@ -995,6 +1000,11 @@ int SSLClientSocketOpenSSL::DoHandshake() {
UpdateServerCert();
GotoState(STATE_VERIFY_CERT);
} else {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile4(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::DoHandshake4"));
+
int ssl_error = SSL_get_error(ssl_, rv);
if (ssl_error == SSL_ERROR_WANT_CHANNEL_ID_LOOKUP) {
@@ -1200,6 +1210,11 @@ void SSLClientSocketOpenSSL::DoConnectCallback(int rv) {
}
void SSLClientSocketOpenSSL::UpdateServerCert() {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::UpdateServerCert"));
+
server_cert_chain_->Reset(SSL_get_peer_cert_chain(ssl_));
server_cert_ = server_cert_chain_->AsOSChain();
@@ -1271,7 +1286,7 @@ void SSLClientSocketOpenSSL::VerifyCT() {
SSLConfigService::GetEVCertsWhitelist();
if (!policy_enforcer_->DoesConformToCTEVPolicy(
server_cert_verify_result_.verified_cert.get(),
- ev_whitelist.get(), ct_verify_result_)) {
+ ev_whitelist.get(), ct_verify_result_, net_log_)) {
// TODO(eranm): Log via the BoundNetLog, see crbug.com/437766
VLOG(1) << "EV certificate for "
<< server_cert_verify_result_.verified_cert->subject()
@@ -1869,6 +1884,11 @@ long SSLClientSocketOpenSSL::BIOCallback(
int cmd,
const char *argp, int argi, long argl,
long retvalue) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::BIOCallback"));
+
SSLClientSocketOpenSSL* socket = reinterpret_cast<SSLClientSocketOpenSSL*>(
BIO_get_callback_arg(bio));
CHECK(socket);
@@ -1880,6 +1900,11 @@ long SSLClientSocketOpenSSL::BIOCallback(
void SSLClientSocketOpenSSL::InfoCallback(const SSL* ssl,
int type,
int /*val*/) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::InfoCallback"));
+
if (type == SSL_CB_HANDSHAKE_DONE) {
SSLClientSocketOpenSSL* ssl_socket =
SSLContext::GetInstance()->GetClientSocketFromSSL(ssl);
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | net/socket/ssl_session_cache_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698