Chromium Code Reviews| Index: net/http/http_network_transaction.cc |
| diff --git a/net/http/http_network_transaction.cc b/net/http/http_network_transaction.cc |
| index 467eb940a65d7a6687b7085b3e9257f615036ab5..0c0ba5f9f3a5aff6599457d2ca8c47d673610da5 100644 |
| --- a/net/http/http_network_transaction.cc |
| +++ b/net/http/http_network_transaction.cc |
| @@ -47,6 +47,7 @@ |
| #include "net/http/http_stream_base.h" |
| #include "net/http/http_stream_factory.h" |
| #include "net/http/http_util.h" |
| +#include "net/http/transport_security_state.h" |
| #include "net/http/url_security_manager.h" |
| #include "net/socket/client_socket_factory.h" |
| #include "net/socket/socks_client_socket_pool.h" |
| @@ -1221,6 +1222,15 @@ int HttpNetworkTransaction::HandleSSLHandshakeError(int error) { |
| case ERR_SSL_VERSION_OR_CIPHER_MISMATCH: |
| if (server_ssl_config_.version_max >= SSL_PROTOCOL_VERSION_TLS1 && |
| server_ssl_config_.version_max > server_ssl_config_.version_min) { |
| + |
| + if (server_ssl_config_.version_max == SSL_PROTOCOL_VERSION_TLS1 && |
|
agl
2013/04/16 15:19:24
Can't think chunk live before the switch() and thu
Ryan Sleevi
2013/04/16 19:55:26
Yeah, I think this switch can/should be re-organiz
thaidn_google
2013/04/17 00:46:17
Done.
|
| + !server_ssl_config_.ssl_version_min_preloaded_disabled && |
| + TransportSecurityState::IsGooglePinnedProperty( |
| + request_->url.host(), true /* include SNI */ )) { |
| + // Chrome shouldn't fallback to SSL3 for Google's properties. |
| + break; |
| + } |
| + |
| // This could be a TLS-intolerant server or a server that chose a |
| // cipher suite defined only for higher protocol versions (such as |
| // an SSL 3.0 server that chose a TLS-only cipher suite). Fall |
| @@ -1247,6 +1257,14 @@ int HttpNetworkTransaction::HandleSSLHandshakeError(int error) { |
| case ERR_SSL_BAD_RECORD_MAC_ALERT: |
| if (server_ssl_config_.version_max >= SSL_PROTOCOL_VERSION_TLS1 && |
| server_ssl_config_.version_min == SSL_PROTOCOL_VERSION_SSL3) { |
| + |
| + if (!server_ssl_config_.ssl_version_min_preloaded_disabled && |
| + TransportSecurityState::IsGooglePinnedProperty( |
| + request_->url.host(), true /* include SNI */ )) { |
| + // Chrome shouldn't fallback to SSL3 for Google's properties. |
| + break; |
| + } |
| + |
| // This could be a server with buggy DEFLATE support. Turn off TLS, |
| // DEFLATE support and retry. |
| // TODO(wtc): turn off DEFLATE support only. Do not tie it to TLS. |