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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 817653003: Update from https://crrev.com/309717 (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/socket_test_util.h ('k') | 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 7f44725729359efcbe5bcb325180c54333b1e350..10e9d0c0e4663a01a91cdc81f2b9135aac7cac5c 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -931,14 +931,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.
@@ -1229,6 +1241,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()) {
@@ -1241,6 +1258,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 | « net/socket/socket_test_util.h ('k') | net/ssl/openssl_platform_key_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698