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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 787913003: Instrumenting SSL_do_handshake and UpdateServerCert to find jank (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More rsleevi@ comments 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 | « no previous file | net/ssl/openssl_platform_key_win.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 74ac8fc7a7a577ca268e217545f85e2d82437260..181c8c9cf21bc7bf416c7c07df635cd3022f7266 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -918,14 +918,26 @@ bool SSLClientSocketOpenSSL::DoTransportIO() {
}
int SSLClientSocketOpenSSL::DoHandshake() {
- // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
- tracked_objects::ScopedTracker tracking_profile1(
- FROM_HERE_WITH_EXPLICIT_FUNCTION(
- "424386 SSLClientSocketOpenSSL::DoHandshake1"));
-
crypto::OpenSSLErrStackTracer err_tracer(FROM_HERE);
int net_error = OK;
- int rv = SSL_do_handshake(ssl_);
+
+ int rv;
+
+ // TODO(vadimt): Leave only 1 call to SSL_do_handshake once crbug.com/424386
+ // is fixed.
+ if (ssl_config_.send_client_cert && ssl_config_.client_cert.get()) {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("424386 DoHandshake_WithCert"));
+
+ rv = SSL_do_handshake(ssl_);
+ } else {
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION("424386 DoHandshake_WithoutCert"));
+
+ rv = SSL_do_handshake(ssl_);
+ }
if (client_auth_cert_needed_) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
@@ -1216,6 +1228,11 @@ void SSLClientSocketOpenSSL::UpdateServerCert() {
"424386 SSLClientSocketOpenSSL::UpdateServerCert"));
server_cert_chain_->Reset(SSL_get_peer_cert_chain(ssl_));
+
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
+ tracked_objects::ScopedTracker tracking_profile1(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::UpdateServerCert1"));
server_cert_ = server_cert_chain_->AsOSChain();
if (server_cert_.get()) {
@@ -1228,6 +1245,12 @@ void SSLClientSocketOpenSSL::UpdateServerCert() {
// update IsOCSPStaplingSupported for Mac. https://crbug.com/430714
if (IsOCSPStaplingSupported()) {
#if defined(OS_WIN)
+ // TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is
+ // fixed.
+ tracked_objects::ScopedTracker tracking_profile2(
+ FROM_HERE_WITH_EXPLICIT_FUNCTION(
+ "424386 SSLClientSocketOpenSSL::UpdateServerCert2"));
+
const uint8_t* ocsp_response_raw;
size_t ocsp_response_len;
SSL_get0_ocsp_response(ssl_, &ocsp_response_raw, &ocsp_response_len);
« no previous file with comments | « no previous file | net/ssl/openssl_platform_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698