Skip to content

Commit

Permalink
Disable TLS 1.0/1.1 support in WebView by default
Browse files Browse the repository at this point in the history
This (1) flips the kWebViewLegacyTlsSupport feature flag to be
disabled by default (turning off support for TLS 1.0/1.1 in WebView),
(2) removes the field trial config entry, and (3) updates a test for
the flag-enabled case.

Bug: 1294330
Change-Id: I977e200870c41612c95962e021c07dd52b74f132
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/3763335
Reviewed-by: Richard Coles <torne@chromium.org>
Commit-Queue: Chris Thompson <cthomp@chromium.org>
Cr-Commit-Position: refs/heads/main@{#1024775}
  • Loading branch information
christhompson authored and Chromium LUCI CQ committed Jul 15, 2022
1 parent 24e5493 commit baa5cec
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 17 deletions.
7 changes: 6 additions & 1 deletion android_webview/browser/aw_browser_context_unittest.cc
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,13 @@ TEST_F(AwBrowserContextTest, SHA1LocalAnchorsAllowed) {
network_context_params.initial_ssl_config->sha1_local_anchors_enabled);
}

// Tests that TLS 1.0/1.1 is still allowed for WebView by default.
// Tests that TLS 1.0/1.1 is still allowed for WebView if the escape hatch
// feature is enabled.
TEST_F(AwBrowserContextTest, LegacyTLSVersionsAllowed) {
base::test::ScopedFeatureList feature_list;
feature_list.InitAndEnableFeature(
android_webview::features::kWebViewLegacyTlsSupport);

AwBrowserContext context;
network::mojom::NetworkContextParams network_context_params;
cert_verifier::mojom::CertVerifierCreationParams cert_verifier_params;
Expand Down
2 changes: 1 addition & 1 deletion android_webview/common/aw_features.cc
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ const base::Feature kWebViewJavaJsBridgeMojo{"WebViewJavaJsBridgeMojo",

// When enabled, connections using legacy TLS 1.0/1.1 versions are allowed.
const base::Feature kWebViewLegacyTlsSupport{"WebViewLegacyTlsSupport",
base::FEATURE_ENABLED_BY_DEFAULT};
base::FEATURE_DISABLED_BY_DEFAULT};

// Measure the number of pixels occupied by one or more WebViews as a
// proportion of the total screen size. Depending on the number of
Expand Down
15 changes: 0 additions & 15 deletions testing/variations/fieldtrial_testing_config.json
Original file line number Diff line number Diff line change
Expand Up @@ -10076,21 +10076,6 @@
]
}
],
"WebViewLegacyTlsSupport": [
{
"platforms": [
"android_webview"
],
"experiments": [
{
"name": "Disabled",
"disable_features": [
"WebViewLegacyTlsSupport"
]
}
]
}
],
"WebViewMeasureScreenCoverage": [
{
"platforms": [
Expand Down

0 comments on commit baa5cec

Please sign in to comment.