Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(222)

Unified Diff: net/cert/test_root_certs_nss.cc

Issue 137553004: NSS Cros multiprofile: trust roots added by a profile shouldn't apply to other profiles. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: ios fix Created 6 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/cert/test_root_certs.h ('k') | net/cert/test_root_certs_openssl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/test_root_certs_nss.cc
diff --git a/net/cert/test_root_certs_nss.cc b/net/cert/test_root_certs_nss.cc
index 3a2f88a79684eabb9ce39fda39e052bacd96e2f8..3c271452fafd0af62562b41393a4a761e45769e5 100644
--- a/net/cert/test_root_certs_nss.cc
+++ b/net/cert/test_root_certs_nss.cc
@@ -114,6 +114,17 @@ bool TestRootCerts::IsEmpty() const {
return trust_cache_.empty();
}
+#if defined(USE_NSS)
+bool TestRootCerts::Contains(CERTCertificate* cert) const {
+ for (std::list<TrustEntry*>::const_iterator it = trust_cache_.begin();
+ it != trust_cache_.end(); ++it) {
+ if (X509Certificate::IsSameOSCert(cert, (*it)->certificate()))
+ return true;
+ }
+ return false;
+}
+#endif
+
TestRootCerts::~TestRootCerts() {
Clear();
}
« no previous file with comments | « net/cert/test_root_certs.h ('k') | net/cert/test_root_certs_openssl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698