summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:01 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:02:01 +0000
commit088c0cefd0f8b5482cc227955cc3057d47ec24b6 (patch)
tree05f2021c7dd804334bcb781bb0c4881e971cd8fe /security
parentAdding debian version 126.0-1. (diff)
downloadfirefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.tar.xz
firefox-088c0cefd0f8b5482cc227955cc3057d47ec24b6.zip
Merging upstream version 126.0.1.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'security')
-rw-r--r--security/certverifier/NSSCertDBTrustDomain.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/security/certverifier/NSSCertDBTrustDomain.cpp b/security/certverifier/NSSCertDBTrustDomain.cpp
index dc13eb0b8f..a631b50572 100644
--- a/security/certverifier/NSSCertDBTrustDomain.cpp
+++ b/security/certverifier/NSSCertDBTrustDomain.cpp
@@ -476,16 +476,22 @@ Result NSSCertDBTrustDomain::GetCertTrust(EndEntityOrCA endEntityOrCA,
// candidate certificate is a third-party certificate, above.
SECItem candidateCertDERSECItem =
UnsafeMapInputToSECItem(candidateCertDER);
+
+ // This metric can be evaluated as many as 600 times during a cnn.com
+ // load so we avoid measuring it on Android because of the high
+ // cost of serializing the db everytime we measure.
+#ifndef MOZ_WIDGET_ANDROID
auto timerId =
mozilla::glean::cert_verifier::cert_trust_evaluation_time.Start();
-
+#endif
UniqueCERTCertificate candidateCert(CERT_NewTempCertificate(
CERT_GetDefaultCertDB(), &candidateCertDERSECItem, nullptr, false,
true));
+#ifndef MOZ_WIDGET_ANDROID
mozilla::glean::cert_verifier::cert_trust_evaluation_time
.StopAndAccumulate(std::move(timerId));
-
+#endif
if (!candidateCert) {
result = MapPRErrorCodeToResult(PR_GetError());
return;