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

Unified Diff: net/socket/ssl_client_socket_openssl.cc

Issue 1013193004: Remove dead code in client auth logic. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 months 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') | 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 63e7f830674a76b3a329ab376e54d464c29bbb5b..53c180e11a054ab5dec74ac86ce7c74d051934aa 100644
--- a/net/socket/ssl_client_socket_openssl.cc
+++ b/net/socket/ssl_client_socket_openssl.cc
@@ -926,27 +926,7 @@ int SSLClientSocketOpenSSL::DoHandshake() {
}
}
- 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
- // so that we won't try to resume the non-client-authenticated session in
- // the next handshake. This will cause the server to ask for a client
- // cert again.
- if (rv == 1) {
- // Remove from session cache but don't clear this connection.
- SSL_SESSION* session = SSL_get_session(ssl_);
- if (session) {
- int rv = SSL_CTX_remove_session(SSL_get_SSL_CTX(ssl_), session);
- LOG_IF(WARNING, !rv) << "Couldn't invalidate SSL session: " << session;
- }
- }
- } else if (rv == 1) {
+ if (rv == 1) {
// TODO(vadimt): Remove ScopedTracker below once crbug.com/424386 is fixed.
tracked_objects::ScopedTracker tracking_profile3(
FROM_HERE_WITH_EXPLICIT_FUNCTION(
@@ -1004,6 +984,9 @@ int SSLClientSocketOpenSSL::DoHandshake() {
FROM_HERE_WITH_EXPLICIT_FUNCTION(
"424386 SSLClientSocketOpenSSL::DoHandshake4"));
+ if (client_auth_cert_needed_)
+ return ERR_SSL_CLIENT_AUTH_CERT_NEEDED;
+
int ssl_error = SSL_get_error(ssl_, rv);
if (ssl_error == SSL_ERROR_WANT_CHANNEL_ID_LOOKUP) {
« no previous file with comments | « net/socket/ssl_client_socket_nss.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698