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

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: handle additional trust roots, add TestRootCertsTest.Contains, remove instantiated certtests from c… Created 6 years, 11 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..0a4711e881fe9c2d8b87ca8b06e01e0d9304f440 100644
--- a/net/cert/test_root_certs_nss.cc
+++ b/net/cert/test_root_certs_nss.cc
@@ -114,6 +114,16 @@ bool TestRootCerts::IsEmpty() const {
return trust_cache_.empty();
}
+bool TestRootCerts::Contains(X509Certificate::OSCertHandle cert) const {
+ for (std::list<TrustEntry*>::const_iterator it = trust_cache_.begin();
+ it != trust_cache_.end();
Ryan Sleevi 2014/01/30 05:27:40 ++it on this line
mattm 2014/02/04 05:31:21 Done.
+ ++it) {
+ if (X509Certificate::IsSameOSCert(cert, (*it)->certificate()))
+ return true;
+ }
+ return false;
+}
+
TestRootCerts::~TestRootCerts() {
Clear();
}

Powered by Google App Engine
This is Rietveld 408576698