summaryrefslogtreecommitdiff
path: root/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch
diff options
context:
space:
mode:
Diffstat (limited to 'www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch')
-rw-r--r--www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch23
1 files changed, 23 insertions, 0 deletions
diff --git a/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch
new file mode 100644
index 0000000..0c208d0
--- /dev/null
+++ b/www/chromium-uc/patches/extra/ungoogled-chromium/add-flag-to-disable-tls-grease.patch
@@ -0,0 +1,23 @@
1--- a/chrome/browser/ungoogled_flag_entries.h
2+++ b/chrome/browser/ungoogled_flag_entries.h
3@@ -92,4 +92,8 @@
4 "Referrer directive",
5 "Allows setting a custom directive for referrer headers. The no cross-origin referrer option removes all cross-origin referrers, the minimal option removes all cross-origin referrers and strips same-origin referrers down to the origin, and the no referrers option removes all referrers. ungoogled-chromium flag.",
6 kOsAll, MULTI_VALUE_TYPE(kReferrerDirective)},
7+ {"disable-grease-tls",
8+ "Disable GREASE for TLS",
9+ "Turn off GREASE (Generate Random Extensions And Sustain Extensibility) for TLS connections. ungoogled-chromium flag.",
10+ kOsAll, SINGLE_VALUE_TYPE("disable-grease-tls")},
11 #endif // CHROME_BROWSER_UNGOOGLED_FLAG_ENTRIES_H_
12--- a/net/socket/ssl_client_socket_impl.cc
13+++ b/net/socket/ssl_client_socket_impl.cc
14@@ -311,7 +311,8 @@ class SSLClientSocketImpl::SSLContext {
15 SSL_CTX_sess_set_new_cb(ssl_ctx_.get(), NewSessionCallback);
16 SSL_CTX_set_timeout(ssl_ctx_.get(), 1 * 60 * 60 /* one hour */);
17
18- SSL_CTX_set_grease_enabled(ssl_ctx_.get(), 1);
19+ int grease_mode = !base::CommandLine::ForCurrentProcess()->HasSwitch("disable-grease-tls");
20+ SSL_CTX_set_grease_enabled(ssl_ctx_.get(), grease_mode);
21
22 // Deduplicate all certificates minted from the SSL_CTX in memory.
23 SSL_CTX_set0_buffer_pool(ssl_ctx_.get(), x509_util::GetBufferPool());