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

Unified Diff: net/http/http_network_transaction.cc

Issue 7242: The Schannel considers some cipher suites (e.g., the... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 12 years, 2 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
Index: net/http/http_network_transaction.cc
===================================================================
--- net/http/http_network_transaction.cc (revision 3081)
+++ net/http/http_network_transaction.cc (working copy)
@@ -496,10 +496,10 @@
next_state_ = STATE_WRITE_HEADERS;
if (using_tunnel_)
establishing_tunnel_ = true;
- } else if (result == ERR_SSL_PROTOCOL_ERROR) {
+ } else {
result = HandleSSLHandshakeError(result);
- } else {
- result = ReconsiderProxyAfterError(result);
+ if (result != OK)
+ result = ReconsiderProxyAfterError(result);
}
return result;
}
@@ -521,7 +521,7 @@
if (result == OK) {
next_state_ = STATE_WRITE_HEADERS;
- } else if (result == ERR_SSL_PROTOCOL_ERROR) {
+ } else {
result = HandleSSLHandshakeError(result);
}
return result;
@@ -881,13 +881,19 @@
int HttpNetworkTransaction::HandleSSLHandshakeError(int error) {
#if defined(OS_WIN)
- if (ssl_version_mask_ & SSLClientSocket::TLS1) {
- // This could be a TLS-intolerant server. Turn off TLS 1.0 and retry.
- ssl_version_mask_ &= ~SSLClientSocket::TLS1;
- connection_.set_socket(NULL);
- connection_.Reset();
- next_state_ = STATE_INIT_CONNECTION;
- error = OK;
+ switch (error) {
+ case ERR_SSL_PROTOCOL_ERROR:
+ case ERR_SSL_VERSION_OR_CIPHER_MISMATCH:
+ if (ssl_version_mask_ & SSLClientSocket::TLS1) {
+ // This could be a TLS-intolerant server or an SSL 3.0 server that
+ // chose a TLS-only cipher suite. Turn off TLS 1.0 and retry.
+ ssl_version_mask_ &= ~SSLClientSocket::TLS1;
+ connection_.set_socket(NULL);
+ connection_.Reset();
+ next_state_ = STATE_INIT_CONNECTION;
+ error = OK;
+ }
+ break;
}
#endif
return error;

Powered by Google App Engine
This is Rietveld 408576698