summaryrefslogtreecommitdiffstats
path: root/security
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:01:59 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-05-30 03:01:59 +0000
commit85310221f0512bf1aeefc49ead8a1e11bda55990 (patch)
tree70a3efbfee6c7cbeb626185b35166d2c376b4bb8 /security
parentAdding upstream version 126.0. (diff)
downloadfirefox-85310221f0512bf1aeefc49ead8a1e11bda55990.tar.xz
firefox-85310221f0512bf1aeefc49ead8a1e11bda55990.zip
Adding upstream version 126.0.1.upstream/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;