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

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 TestRootCerts 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
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..edee42759ec2afb2956b8f26c829960202f251a5 100644
--- a/net/cert/test_root_certs_nss.cc
+++ b/net/cert/test_root_certs_nss.cc
@@ -114,6 +114,15 @@ bool TestRootCerts::IsEmpty() const {
return trust_cache_.empty();
}
+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;
+}
+
TestRootCerts::~TestRootCerts() {
Clear();
}

Powered by Google App Engine
This is Rietveld 408576698