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

Unified Diff: net/cert/test_root_certs_openssl.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_openssl.cc
diff --git a/net/cert/test_root_certs_openssl.cc b/net/cert/test_root_certs_openssl.cc
index 99e1976c6c113f4cf4c3eccfacfb63e3b8a5254c..cde4bb821f0ed62b0cd922df6f4482093ff1e928 100644
--- a/net/cert/test_root_certs_openssl.cc
+++ b/net/cert/test_root_certs_openssl.cc
@@ -42,6 +42,17 @@ bool TestRootCerts::IsEmpty() const {
return temporary_roots_.empty();
}
+bool TestRootCerts::Contains(X509Certificate::OSCertHandle cert) const {
+ for (std::vector<scoped_refptr<X509Certificate> >::const_iterator it =
+ temporary_roots_.begin();
+ it != temporary_roots_.end();
+ ++it) {
Ryan Sleevi 2014/01/30 05:27:40 ditto on ++it
mattm 2014/02/04 05:31:21 Done.
+ if (X509Certificate::IsSameOSCert(cert, (*it)->os_cert_handle()))
+ return true;
+ }
+ return false;
+}
+
TestRootCerts::~TestRootCerts() {}
void TestRootCerts::Init() {}

Powered by Google App Engine
This is Rietveld 408576698