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

Unified Diff: components/ssl_config/ssl_config_service_manager_pref.cc

Issue 1682623002: Disable the TLS version fallback. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 10 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: components/ssl_config/ssl_config_service_manager_pref.cc
diff --git a/components/ssl_config/ssl_config_service_manager_pref.cc b/components/ssl_config/ssl_config_service_manager_pref.cc
index 8d8cf5ce4b90897a42b0ea1975187a0a149532e6..b0837137e56a4a171e180d82ce527ae4e70d9738 100644
--- a/components/ssl_config/ssl_config_service_manager_pref.cc
+++ b/components/ssl_config/ssl_config_service_manager_pref.cc
@@ -197,6 +197,12 @@ SSLConfigServiceManagerPref::SSLConfigServiceManagerPref(
ssl_config::prefs::kRC4Enabled,
new base::FundamentalValue(IsRC4EnabledByDefault()));
+ // TODO(davidben): Remove this when the fallback removal has succeeded.
+ local_state->SetDefaultPrefValue(
+ ssl_config::prefs::kSSLVersionFallbackMin,
+ new base::StringValue(
+ base::FieldTrialList::FindFullName("SSLVersionFallbackMin")));
Ryan Sleevi 2016/02/09 02:16:12 I think you want to indirect this through a functi
davidben 2016/02/09 02:58:36 I believe these get called at a point where fetch
davidben 2016/02/09 02:59:08 (I believe it's the empty string, not "Default".)
Ryan Sleevi 2016/02/09 03:28:43 I don't believe the RC4 one would necessarily work
davidben 2016/02/09 05:11:56 It works. It's pretty easy to test this with --for
+
PrefChangeRegistrar::NamedChangeCallback local_state_callback =
base::Bind(&SSLConfigServiceManagerPref::OnPreferenceChanged,
base::Unretained(this), local_state);
@@ -294,7 +300,9 @@ void SSLConfigServiceManagerPref::GetSSLConfigFromPrefs(
uint16_t supported_version_max = config->version_max;
config->version_max = std::min(supported_version_max, version_max);
}
- if (version_fallback_min) {
+ // Values below TLS 1.1 are invalid.
+ if (version_fallback_min &&
+ version_fallback_min >= net::SSL_PROTOCOL_VERSION_TLS1_1) {
config->version_fallback_min = version_fallback_min;
}
config->disabled_cipher_suites = disabled_cipher_suites_;

Powered by Google App Engine
This is Rietveld 408576698