|
@@ -1,93 +1,76 @@
|
|
-From: uazo <uazo@users.noreply.github.com>
|
|
|
|
-Date: Tue, 18 Jan 2022 16:02:06 +0000
|
|
|
|
|
|
+From: csagan5 <32685696+csagan5@users.noreply.github.com>
|
|
|
|
+Date: Fri, 10 Jun 2022 14:20:02 +0200
|
|
Subject: Enable Certificate Transparency
|
|
Subject: Enable Certificate Transparency
|
|
|
|
|
|
-Disable CT reporting
|
|
|
|
|
|
+Reporting/auditing functionalities are disabled; a flag is exposed.
|
|
---
|
|
---
|
|
chrome/browser/about_flags.cc | 5 +++++
|
|
chrome/browser/about_flags.cc | 5 +++++
|
|
- chrome/browser/browser_features.cc | 4 ++--
|
|
|
|
- .../pki_metadata_component_installer.cc | 3 ++-
|
|
|
|
|
|
+ chrome/browser/browser_features.cc | 2 +-
|
|
chrome/browser/flag_descriptions.cc | 4 ++++
|
|
chrome/browser/flag_descriptions.cc | 4 ++++
|
|
chrome/browser/flag_descriptions.h | 3 +++
|
|
chrome/browser/flag_descriptions.h | 3 +++
|
|
chrome/browser/net/system_network_context_manager.cc | 4 ----
|
|
chrome/browser/net/system_network_context_manager.cc | 4 ----
|
|
- chrome/browser/ssl/sct_reporting_service.cc | 3 +++
|
|
|
|
- chrome/common/chrome_features.cc | 2 +-
|
|
|
|
- net/http/transport_security_state.cc | 12 +++++-------
|
|
|
|
- net/url_request/report_sender.cc | 2 +-
|
|
|
|
- services/network/network_context.cc | 10 +++++++---
|
|
|
|
- services/network/public/cpp/features.gni | 2 +-
|
|
|
|
- .../network/sct_auditing/sct_auditing_handler.cc | 6 ++++++
|
|
|
|
- 13 files changed, 40 insertions(+), 20 deletions(-)
|
|
|
|
|
|
+ chrome/browser/ssl/sct_reporting_service.cc | 5 +++++
|
|
|
|
+ chrome/common/chrome_features.cc | 6 +++---
|
|
|
|
+ net/http/transport_security_state.cc | 12 +++---------
|
|
|
|
+ net/url_request/report_sender.cc | 3 ++-
|
|
|
|
+ services/network/network_context.cc | 2 +-
|
|
|
|
+ .../network/sct_auditing/sct_auditing_handler.cc | 2 ++
|
|
|
|
+ 11 files changed, 29 insertions(+), 19 deletions(-)
|
|
|
|
|
|
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
|
|
--- a/chrome/browser/about_flags.cc
|
|
--- a/chrome/browser/about_flags.cc
|
|
+++ b/chrome/browser/about_flags.cc
|
|
+++ b/chrome/browser/about_flags.cc
|
|
-@@ -8164,6 +8164,11 @@ const FeatureEntry kFeatureEntries[] = {
|
|
|
|
- kOsWin | kOsLinux | kOsLacros,
|
|
|
|
- FEATURE_VALUE_TYPE(features::kWebBluetoothBondOnDemand)},
|
|
|
|
-
|
|
|
|
|
|
+@@ -8168,6 +8168,11 @@ const FeatureEntry kFeatureEntries[] = {
|
|
|
|
+ flag_descriptions::kWebMidiDescription, kOsAll,
|
|
|
|
+ FEATURE_VALUE_TYPE(features::kWebMidi)},
|
|
|
|
+ #if BUILDFLAG(IS_ANDROID)
|
|
+ {"certificate-transparency-enabled",
|
|
+ {"certificate-transparency-enabled",
|
|
+ flag_descriptions::kCTEnabledName,
|
|
+ flag_descriptions::kCTEnabledName,
|
|
+ flag_descriptions::kCTEnabledDescription, kOsAndroid,
|
|
+ flag_descriptions::kCTEnabledDescription, kOsAndroid,
|
|
+ FEATURE_VALUE_TYPE(features::kCertificateTransparencyAndroid)},
|
|
+ FEATURE_VALUE_TYPE(features::kCertificateTransparencyAndroid)},
|
|
+
|
|
+
|
|
- #if BUILDFLAG(IS_CHROMEOS_ASH)
|
|
|
|
- {"enable-libinput-to-handle-touchpad",
|
|
|
|
- flag_descriptions::kEnableLibinputToHandleTouchpadName,
|
|
|
|
|
|
+ {"use-real-color-space-for-android-video",
|
|
|
|
+ flag_descriptions::kUseRealColorSpaceForAndroidVideoName,
|
|
|
|
+ flag_descriptions::kUseRealColorSpaceForAndroidVideoDescription,
|
|
diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc
|
|
diff --git a/chrome/browser/browser_features.cc b/chrome/browser/browser_features.cc
|
|
--- a/chrome/browser/browser_features.cc
|
|
--- a/chrome/browser/browser_features.cc
|
|
+++ b/chrome/browser/browser_features.cc
|
|
+++ b/chrome/browser/browser_features.cc
|
|
-@@ -142,8 +142,8 @@ const base::Feature kWebUsbDeviceDetection{"WebUsbDeviceDetection",
|
|
|
|
-
|
|
|
|
|
|
+@@ -143,7 +143,7 @@ const base::Feature kWebUsbDeviceDetection{"WebUsbDeviceDetection",
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
#if BUILDFLAG(IS_ANDROID)
|
|
// Enables Certificate Transparency on Android.
|
|
// Enables Certificate Transparency on Android.
|
|
--const base::Feature kCertificateTransparencyAndroid{
|
|
|
|
|
|
+ const base::Feature kCertificateTransparencyAndroid{
|
|
- "CertificateTransparencyAndroid", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
- "CertificateTransparencyAndroid", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
-+const base::Feature kCertificateTransparencyAndroid{ // must be enabled in Bromite
|
|
|
|
-+ "CertificateTransparencyAndroid", base::FEATURE_ENABLED_BY_DEFAULT}; // ^
|
|
|
|
|
|
++ "CertificateTransparencyAndroid", base::FEATURE_ENABLED_BY_DEFAULT}; // enabled by default in Bromite
|
|
#endif
|
|
#endif
|
|
|
|
|
|
const base::Feature kLargeFaviconFromGoogle{"LargeFaviconFromGoogle",
|
|
const base::Feature kLargeFaviconFromGoogle{"LargeFaviconFromGoogle",
|
|
-diff --git a/chrome/browser/component_updater/pki_metadata_component_installer.cc b/chrome/browser/component_updater/pki_metadata_component_installer.cc
|
|
|
|
---- a/chrome/browser/component_updater/pki_metadata_component_installer.cc
|
|
|
|
-+++ b/chrome/browser/component_updater/pki_metadata_component_installer.cc
|
|
|
|
-@@ -61,7 +61,8 @@ const char kGoogleOperatorName[] = "Google";
|
|
|
|
- // The extension id is: efniojlnjndmcbiieegkicadnoecjjef
|
|
|
|
- const uint8_t kPKIMetadataPublicKeySHA256[32] = {
|
|
|
|
- 0x45, 0xd8, 0xe9, 0xbd, 0x9d, 0x3c, 0x21, 0x88, 0x44, 0x6a, 0x82,
|
|
|
|
-- 0x03, 0xde, 0x42, 0x99, 0x45, 0x66, 0x25, 0xfe, 0xb3, 0xd1, 0xf8,
|
|
|
|
-+ // this is changed on purpose in Bromite
|
|
|
|
-+ 0x01, 0x02, 0x03, 0x04, 0x05, 0x66, 0x25, 0xfe, 0xb3, 0xd1, 0xf8,
|
|
|
|
- 0x11, 0x65, 0xb4, 0x6f, 0xd3, 0x1b, 0x21, 0x89, 0xbe, 0x9c};
|
|
|
|
-
|
|
|
|
- const base::FilePath::CharType kCTConfigProtoFileName[] =
|
|
|
|
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
|
diff --git a/chrome/browser/flag_descriptions.cc b/chrome/browser/flag_descriptions.cc
|
|
--- a/chrome/browser/flag_descriptions.cc
|
|
--- a/chrome/browser/flag_descriptions.cc
|
|
+++ b/chrome/browser/flag_descriptions.cc
|
|
+++ b/chrome/browser/flag_descriptions.cc
|
|
-@@ -5917,6 +5917,10 @@ const char kUIDebugToolsDescription[] =
|
|
|
|
- "Enables additional keyboard shortcuts to help debugging.";
|
|
|
|
- #endif
|
|
|
|
|
|
+@@ -5934,6 +5934,10 @@ const char kAutofillCreditCardUploadDescription[] =
|
|
|
|
+ #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
|
|
|
|
|
|
|
|
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
+const char kCTEnabledName[] = "Enable Certificate Transparency";
|
|
+const char kCTEnabledName[] = "Enable Certificate Transparency";
|
|
+const char kCTEnabledDescription[] =
|
|
+const char kCTEnabledDescription[] =
|
|
-+ "Enables compliance against the Certificate Transparency Policy, without any reports being issued.";
|
|
|
|
|
|
++ "Enables compliance against the Certificate Transparency Policy, with reporting disabled.";
|
|
+
|
|
+
|
|
- #if defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
- const char kWebrtcPipeWireCapturerName[] = "WebRTC PipeWire support";
|
|
|
|
- const char kWebrtcPipeWireCapturerDescription[] =
|
|
|
|
|
|
+ const char kElasticOverscrollName[] = "Elastic Overscroll";
|
|
|
|
+ const char kElasticOverscrollDescription[] =
|
|
|
|
+ "Enables Elastic Overscrolling on touchscreens and precision touchpads.";
|
|
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
|
diff --git a/chrome/browser/flag_descriptions.h b/chrome/browser/flag_descriptions.h
|
|
--- a/chrome/browser/flag_descriptions.h
|
|
--- a/chrome/browser/flag_descriptions.h
|
|
+++ b/chrome/browser/flag_descriptions.h
|
|
+++ b/chrome/browser/flag_descriptions.h
|
|
-@@ -3436,6 +3436,9 @@ extern const char kUIDebugToolsName[];
|
|
|
|
- extern const char kUIDebugToolsDescription[];
|
|
|
|
- #endif
|
|
|
|
|
|
+@@ -3446,6 +3446,9 @@ extern const char kAutofillCreditCardUploadDescription[];
|
|
|
|
+ #endif // defined(TOOLKIT_VIEWS) || BUILDFLAG(IS_ANDROID)
|
|
|
|
|
|
|
|
+ #if BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
+extern const char kCTEnabledName[];
|
|
+extern const char kCTEnabledName[];
|
|
+extern const char kCTEnabledDescription[];
|
|
+extern const char kCTEnabledDescription[];
|
|
+
|
|
+
|
|
- #if defined(WEBRTC_USE_PIPEWIRE)
|
|
|
|
- extern const char kWebrtcPipeWireCapturerName[];
|
|
|
|
- extern const char kWebrtcPipeWireCapturerDescription[];
|
|
|
|
|
|
+ extern const char kElasticOverscrollName[];
|
|
|
|
+ extern const char kElasticOverscrollDescription[];
|
|
|
|
+ #endif // BUILDFLAG(IS_WIN) || BUILDFLAG(IS_ANDROID)
|
|
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
|
diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/browser/net/system_network_context_manager.cc
|
|
--- a/chrome/browser/net/system_network_context_manager.cc
|
|
--- a/chrome/browser/net/system_network_context_manager.cc
|
|
+++ b/chrome/browser/net/system_network_context_manager.cc
|
|
+++ b/chrome/browser/net/system_network_context_manager.cc
|
|
@@ -112,57 +95,65 @@ diff --git a/chrome/browser/net/system_network_context_manager.cc b/chrome/brows
|
|
diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sct_reporting_service.cc
|
|
diff --git a/chrome/browser/ssl/sct_reporting_service.cc b/chrome/browser/ssl/sct_reporting_service.cc
|
|
--- a/chrome/browser/ssl/sct_reporting_service.cc
|
|
--- a/chrome/browser/ssl/sct_reporting_service.cc
|
|
+++ b/chrome/browser/ssl/sct_reporting_service.cc
|
|
+++ b/chrome/browser/ssl/sct_reporting_service.cc
|
|
-@@ -199,6 +199,9 @@ void SetSCTAuditingEnabledForStoragePartition(
|
|
|
|
|
|
+@@ -199,6 +199,11 @@ void SetSCTAuditingEnabledForStoragePartition(
|
|
} // namespace
|
|
} // namespace
|
|
|
|
|
|
network::mojom::SCTAuditingMode SCTReportingService::GetReportingMode() {
|
|
network::mojom::SCTAuditingMode SCTReportingService::GetReportingMode() {
|
|
+ if ((true)) {
|
|
+ if ((true)) {
|
|
|
|
++ // always disabled in Bromite
|
|
+ return network::mojom::SCTAuditingMode::kDisabled;
|
|
+ return network::mojom::SCTAuditingMode::kDisabled;
|
|
+ }
|
|
+ }
|
|
|
|
++
|
|
if (profile_->IsOffTheRecord() ||
|
|
if (profile_->IsOffTheRecord() ||
|
|
!base::FeatureList::IsEnabled(features::kSCTAuditing)) {
|
|
!base::FeatureList::IsEnabled(features::kSCTAuditing)) {
|
|
return network::mojom::SCTAuditingMode::kDisabled;
|
|
return network::mojom::SCTAuditingMode::kDisabled;
|
|
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
|
diff --git a/chrome/common/chrome_features.cc b/chrome/common/chrome_features.cc
|
|
--- a/chrome/common/chrome_features.cc
|
|
--- a/chrome/common/chrome_features.cc
|
|
+++ b/chrome/common/chrome_features.cc
|
|
+++ b/chrome/common/chrome_features.cc
|
|
-@@ -887,7 +887,7 @@ const base::Feature kSchedulerConfiguration{"SchedulerConfiguration",
|
|
|
|
|
|
+@@ -881,9 +881,9 @@ const base::Feature kSchedulerConfiguration{"SchedulerConfiguration",
|
|
|
|
+
|
|
|
|
+ // Controls whether SCT audit reports are queued and the rate at which they
|
|
// should be sampled. Default sampling rate is 1/10,000 certificates.
|
|
// should be sampled. Default sampling rate is 1/10,000 certificates.
|
|
- #if BUILDFLAG(IS_ANDROID)
|
|
|
|
- const base::Feature kSCTAuditing{"SCTAuditing",
|
|
|
|
|
|
+-#if BUILDFLAG(IS_ANDROID)
|
|
|
|
+-const base::Feature kSCTAuditing{"SCTAuditing",
|
|
- base::FEATURE_DISABLED_BY_DEFAULT};
|
|
- base::FEATURE_DISABLED_BY_DEFAULT};
|
|
-+ base::FEATURE_DISABLED_BY_DEFAULT}; // Bromite: guard against enabling this
|
|
|
|
|
|
++#if BUILDFLAG(IS_ANDROID) // SCT auditing
|
|
|
|
++const base::Feature kSCTAuditing{"SCTAuditing", // must be always
|
|
|
|
++ base::FEATURE_DISABLED_BY_DEFAULT}; // disabled in Bromite
|
|
#else
|
|
#else
|
|
const base::Feature kSCTAuditing{"SCTAuditing",
|
|
const base::Feature kSCTAuditing{"SCTAuditing",
|
|
base::FEATURE_ENABLED_BY_DEFAULT};
|
|
base::FEATURE_ENABLED_BY_DEFAULT};
|
|
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
|
|
diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_state.cc
|
|
--- a/net/http/transport_security_state.cc
|
|
--- a/net/http/transport_security_state.cc
|
|
+++ b/net/http/transport_security_state.cc
|
|
+++ b/net/http/transport_security_state.cc
|
|
-@@ -340,6 +340,7 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) {
|
|
|
|
|
|
+@@ -338,6 +338,7 @@ class HSTSPreloadDecoder : public net::extras::PreloadDecoder {
|
|
|
|
+
|
|
|
|
+ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) {
|
|
#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
|
#if !BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST)
|
|
|
|
++#error "BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST) must be enabled"
|
|
if (g_hsts_source == nullptr)
|
|
if (g_hsts_source == nullptr)
|
|
return false;
|
|
return false;
|
|
-+#error "BUILDFLAG(INCLUDE_TRANSPORT_SECURITY_STATE_PRELOAD_LIST) must be enabled"
|
|
|
|
#endif
|
|
#endif
|
|
- bool found = false;
|
|
|
|
-
|
|
|
|
@@ -383,11 +384,11 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) {
|
|
@@ -383,11 +384,11 @@ bool DecodeHSTSPreload(const std::string& search_hostname, PreloadResult* out) {
|
|
|
|
|
|
// static
|
|
// static
|
|
const base::Feature TransportSecurityState::kDynamicExpectCTFeature{
|
|
const base::Feature TransportSecurityState::kDynamicExpectCTFeature{
|
|
- "DynamicExpectCT", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
- "DynamicExpectCT", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
-+ "DynamicExpectCT", base::FEATURE_DISABLED_BY_DEFAULT};
|
|
|
|
|
|
++ "DynamicExpectCT", base::FEATURE_DISABLED_BY_DEFAULT}; // disabled in Bromite
|
|
|
|
|
|
// static
|
|
// static
|
|
const base::Feature TransportSecurityState::kCertificateTransparencyEnforcement{
|
|
const base::Feature TransportSecurityState::kCertificateTransparencyEnforcement{
|
|
- "CertificateTransparencyEnforcement", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
- "CertificateTransparencyEnforcement", base::FEATURE_ENABLED_BY_DEFAULT};
|
|
-+ "CertificateTransparencyEnforcement", base::FEATURE_ENABLED_BY_DEFAULT}; // Bromite: guard against disabling this
|
|
|
|
|
|
++ "CertificateTransparencyEnforcement", base::FEATURE_ENABLED_BY_DEFAULT}; // always enabled in Bromite
|
|
|
|
|
|
void SetTransportSecurityStateSourceForTesting(
|
|
void SetTransportSecurityStateSourceForTesting(
|
|
const TransportSecurityStateSource* source) {
|
|
const TransportSecurityStateSource* source) {
|
|
-@@ -413,11 +414,6 @@ TransportSecurityState::TransportSecurityState(
|
|
|
|
|
|
+@@ -411,13 +412,6 @@ TransportSecurityState::TransportSecurityState(
|
|
|
|
+ sent_expect_ct_reports_cache_(kMaxReportCacheEntries),
|
|
|
|
+ key_expect_ct_by_nik_(base::FeatureList::IsEnabled(
|
|
features::kPartitionExpectCTStateByNetworkIsolationKey)) {
|
|
features::kPartitionExpectCTStateByNetworkIsolationKey)) {
|
|
- // Static pinning is only enabled for official builds to make sure that
|
|
|
|
- // others don't end up with pins that cannot be easily updated.
|
|
|
|
|
|
+-// Static pinning is only enabled for official builds to make sure that
|
|
|
|
+-// others don't end up with pins that cannot be easily updated.
|
|
-#if !BUILDFLAG(GOOGLE_CHROME_BRANDING) || BUILDFLAG(IS_ANDROID) || \
|
|
-#if !BUILDFLAG(GOOGLE_CHROME_BRANDING) || BUILDFLAG(IS_ANDROID) || \
|
|
- BUILDFLAG(IS_IOS)
|
|
- BUILDFLAG(IS_IOS)
|
|
- enable_static_pins_ = false;
|
|
- enable_static_pins_ = false;
|
|
@@ -171,23 +162,15 @@ diff --git a/net/http/transport_security_state.cc b/net/http/transport_security_
|
|
// Check that there no invalid entries in the static HSTS bypass list.
|
|
// Check that there no invalid entries in the static HSTS bypass list.
|
|
for (auto& host : hsts_host_bypass_list) {
|
|
for (auto& host : hsts_host_bypass_list) {
|
|
DCHECK(host.find('.') == std::string::npos);
|
|
DCHECK(host.find('.') == std::string::npos);
|
|
-@@ -470,6 +466,8 @@ TransportSecurityState::PKPStatus TransportSecurityState::CheckPublicKeyPins(
|
|
|
|
- if (!HasPublicKeyPins(host_port_pair.host())) {
|
|
|
|
- return PKPStatus::OK;
|
|
|
|
- }
|
|
|
|
-+ if (ct_emergency_disable_)
|
|
|
|
-+ return PKPStatus::OK;
|
|
|
|
-
|
|
|
|
- PKPStatus pin_validity = CheckPublicKeyPinsImpl(
|
|
|
|
- host_port_pair, is_issued_by_known_root, public_key_hashes,
|
|
|
|
diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
|
|
diff --git a/net/url_request/report_sender.cc b/net/url_request/report_sender.cc
|
|
--- a/net/url_request/report_sender.cc
|
|
--- a/net/url_request/report_sender.cc
|
|
+++ b/net/url_request/report_sender.cc
|
|
+++ b/net/url_request/report_sender.cc
|
|
-@@ -87,7 +87,7 @@ void ReportSender::Send(const GURL& report_uri,
|
|
|
|
|
|
+@@ -87,7 +87,8 @@ void ReportSender::Send(const GURL& report_uri,
|
|
|
|
|
|
URLRequest* raw_url_request = url_request.get();
|
|
URLRequest* raw_url_request = url_request.get();
|
|
inflight_requests_[raw_url_request] = std::move(url_request);
|
|
inflight_requests_[raw_url_request] = std::move(url_request);
|
|
- raw_url_request->Start();
|
|
- raw_url_request->Start();
|
|
|
|
++ // pretend that request completed
|
|
+ OnResponseStarted(raw_url_request, OK);
|
|
+ OnResponseStarted(raw_url_request, OK);
|
|
}
|
|
}
|
|
|
|
|
|
@@ -200,68 +183,28 @@ diff --git a/services/network/network_context.cc b/services/network/network_cont
|
|
// this even after the call to Build().
|
|
// this even after the call to Build().
|
|
|
|
|
|
- if (params_->enable_certificate_reporting) {
|
|
- if (params_->enable_certificate_reporting) {
|
|
-+ if ((false /*params_->enable_certificate_reporting*/)) {
|
|
|
|
|
|
++ if ((false) /* params_->enable_certificate_reporting*/) {
|
|
net::NetworkTrafficAnnotationTag traffic_annotation =
|
|
net::NetworkTrafficAnnotationTag traffic_annotation =
|
|
net::DefineNetworkTrafficAnnotation("domain_security_policy", R"(
|
|
net::DefineNetworkTrafficAnnotation("domain_security_policy", R"(
|
|
semantics {
|
|
semantics {
|
|
-@@ -2666,7 +2666,7 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
- #if BUILDFLAG(IS_CT_SUPPORTED)
|
|
|
|
-- if (params_->enable_expect_ct_reporting) {
|
|
|
|
-+ if ((false)/*params_->enable_expect_ct_reporting*/) {
|
|
|
|
- LazyCreateExpectCTReporter(result.url_request_context.get());
|
|
|
|
- result.url_request_context->transport_security_state()->SetExpectCTReporter(
|
|
|
|
- expect_ct_reporter_.get());
|
|
|
|
-@@ -2678,9 +2678,13 @@ URLRequestContextOwner NetworkContext::MakeURLRequestContext(
|
|
|
|
- result.url_request_context->transport_security_state()
|
|
|
|
- ->SetRequireCTDelegate(require_ct_delegate_.get());
|
|
|
|
- }
|
|
|
|
-+ else {
|
|
|
|
-+ result.url_request_context->transport_security_state()
|
|
|
|
-+ ->SetCTEmergencyDisabled(true);
|
|
|
|
-+ }
|
|
|
|
- #endif // BUILDFLAG(IS_CT_SUPPORTED)
|
|
|
|
-
|
|
|
|
-- if (params_->enable_domain_reliability) {
|
|
|
|
-+ if ((false)/*params_->enable_domain_reliability*/) {
|
|
|
|
- domain_reliability_monitor_ =
|
|
|
|
- std::make_unique<domain_reliability::DomainReliabilityMonitor>(
|
|
|
|
- result.url_request_context.get(),
|
|
|
|
-diff --git a/services/network/public/cpp/features.gni b/services/network/public/cpp/features.gni
|
|
|
|
---- a/services/network/public/cpp/features.gni
|
|
|
|
-+++ b/services/network/public/cpp/features.gni
|
|
|
|
-@@ -7,7 +7,7 @@ import("//build/config/features.gni")
|
|
|
|
- declare_args() {
|
|
|
|
- # Certificate transparency is not supported on iOS.
|
|
|
|
- # TODO(mmenke): It's actually not supported on Android, either.
|
|
|
|
-- is_ct_supported = !is_ios
|
|
|
|
-+ is_ct_supported = true
|
|
|
|
-
|
|
|
|
- # Controls whether P2P is exposed by the network service.
|
|
|
|
- # Optional to reduce avoid having Chrome on iOS depends on
|
|
|
|
diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/network/sct_auditing/sct_auditing_handler.cc
|
|
diff --git a/services/network/sct_auditing/sct_auditing_handler.cc b/services/network/sct_auditing/sct_auditing_handler.cc
|
|
--- a/services/network/sct_auditing/sct_auditing_handler.cc
|
|
--- a/services/network/sct_auditing/sct_auditing_handler.cc
|
|
+++ b/services/network/sct_auditing/sct_auditing_handler.cc
|
|
+++ b/services/network/sct_auditing/sct_auditing_handler.cc
|
|
-@@ -105,6 +105,9 @@ void SCTAuditingHandler::MaybeEnqueueReport(
|
|
|
|
- const net::X509Certificate* validated_certificate_chain,
|
|
|
|
- const net::SignedCertificateTimestampAndStatusList&
|
|
|
|
- signed_certificate_timestamps) {
|
|
|
|
-+ if ((true)) {
|
|
|
|
-+ return;
|
|
|
|
-+ }
|
|
|
|
|
|
+@@ -108,6 +108,7 @@ void SCTAuditingHandler::MaybeEnqueueReport(
|
|
if (mode_ == mojom::SCTAuditingMode::kDisabled) {
|
|
if (mode_ == mojom::SCTAuditingMode::kDisabled) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
-@@ -294,6 +297,9 @@ void SCTAuditingHandler::AddReporter(
|
|
|
|
- absl::optional<SCTAuditingReporter::SCTHashdanceMetadata> sct_metadata,
|
|
|
|
- std::unique_ptr<net::BackoffEntry> backoff_entry) {
|
|
|
|
- DCHECK(foreground_runner_->RunsTasksInCurrentSequence());
|
|
|
|
-+ if ((true)) {
|
|
|
|
-+ return;
|
|
|
|
-+ }
|
|
|
|
|
|
++ if ((true)) return;
|
|
|
|
+
|
|
|
|
+ // Only audit valid SCTs. This ensures that they come from a known log, have
|
|
|
|
+ // a valid signature, and thus are expected to be public certificates. If
|
|
|
|
+@@ -297,6 +298,7 @@ void SCTAuditingHandler::AddReporter(
|
|
if (mode_ == mojom::SCTAuditingMode::kDisabled) {
|
|
if (mode_ == mojom::SCTAuditingMode::kDisabled) {
|
|
return;
|
|
return;
|
|
}
|
|
}
|
|
|
|
++ if ((true)) return;
|
|
|
|
+
|
|
|
|
+ auto reporter = std::make_unique<SCTAuditingReporter>(
|
|
|
|
+ owner_network_context_, reporter_key, std::move(report),
|
|
--
|
|
--
|
|
2.25.1
|
|
2.25.1
|