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

Unified Diff: net/socket/ssl_client_socket_nss.cc

Issue 19607008: net: allow fallback down to TLS 1.0 in the event of a bad-record-MAC alert. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 5 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 | « no previous file | 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_nss.cc
diff --git a/net/socket/ssl_client_socket_nss.cc b/net/socket/ssl_client_socket_nss.cc
index a984f581faf0036589fbe00c37b75f81f76c4ef9..ee29fdeada6e6dbb3bc42cb9c0da5e51ee912c66 100644
--- a/net/socket/ssl_client_socket_nss.cc
+++ b/net/socket/ssl_client_socket_nss.cc
@@ -1861,6 +1861,15 @@ int SSLClientSocketNSS::Core::DoHandshake() {
net_error = ERR_SSL_PROTOCOL_ERROR;
}
+ // Some broken SSL devices negotiate TLS 1.0 when sent a TLS 1.1 or 1.2
+ // ClientHello, but then return a bad-record-MAC alert. See
+ // crbug.com/260358. In order to make the fallback as minimal as possible,
+ // this fallback is only triggered for >= TLS 1.1.
+ if (net_error == ERR_SSL_BAD_RECORD_MAC_ALERT &&
+ ssl_config_.version_max >= SSL_PROTOCOL_VERSION_TLS1_1) {
+ net_error = ERR_SSL_PROTOCOL_ERROR;
+ }
+
// If not done, stay in this state
if (net_error == ERR_IO_PENDING) {
GotoState(STATE_HANDSHAKE);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698