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

Unified Diff: net/http/http_network_transaction.cc

Issue 280853002: Preserve transport errors for OpenSSL sockets. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: USE_NSS -> USE_OPENSSL for Windows and Mac Created 6 years, 7 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 | net/socket/openssl_ssl_util.cc » ('j') | net/socket/ssl_client_socket_openssl.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_network_transaction.cc
diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc
index d9397e4cfbc30dd4f8eab5fb3cf1e5233b277590..745452c454ebc1c143d64cd7060e7161288f0761 100644
--- a/net/http/http_network_transaction.cc
+++ b/net/http/http_network_transaction.cc
@@ -1379,6 +1379,26 @@ int HttpNetworkTransaction::HandleSSLHandshakeError(int error) {
should_fallback = true;
}
break;
+ case ERR_CONNECTION_RESET:
+ if (version_max >= SSL_PROTOCOL_VERSION_TLS1_1 &&
+ version_max > server_ssl_config_.version_min) {
+ // Some network devices that inspect application-layer packets seem to
+ // inject TCP reset packets to break the connections when they see TLS
+ // 1.1 in ClientHello or ServerHello. See http://crbug.com/130293.
+ //
+ // Only allow ERR_CONNECTION_RESET to trigger a fallback from TLS 1.1 or
+ // 1.2. We don't lose much in this fallback because the explicit IV for
+ // CBC mode in TLS 1.1 is approximated by record splitting in TLS
+ // 1.0. The fallback will be more painful for TLS 1.2 when we have GCM
+ // support.
+ //
+ // ERR_CONNECTION_RESET is a common network error, so we don't want it
+ // to trigger a version fallback in general, especially the TLS 1.0 ->
+ // SSL 3.0 fallback, which would drop TLS extensions.
+ version_max--;
+ should_fallback = true;
+ }
+ break;
case ERR_SSL_INAPPROPRIATE_FALLBACK:
// The server told us that we should not have fallen back. A buggy server
// could trigger ERR_SSL_INAPPROPRIATE_FALLBACK with the initial
« no previous file with comments | « no previous file | net/socket/openssl_ssl_util.cc » ('j') | net/socket/ssl_client_socket_openssl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698