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

Unified Diff: net/cert/test_root_certs.h

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/nss_profile_filter_chromeos_unittest.cc ('k') | net/cert/test_root_certs_nss.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/cert/test_root_certs.h
diff --git a/net/cert/test_root_certs.h b/net/cert/test_root_certs.h
index 03cedcc93385d280eca3971d83faad883e32fd94..cf35a2af126a0422db2b9517550a2cda7c99f4c0 100644
--- a/net/cert/test_root_certs.h
+++ b/net/cert/test_root_certs.h
@@ -23,6 +23,12 @@
#include "base/mac/scoped_cftyperef.h"
#endif
+#if defined(USE_NSS)
+typedef struct CERTCertificateStr CERTCertificate;
+#elif defined(USE_OPENSSL) && !defined(OS_ANDROID)
+typedef struct x509_st X509;
+#endif
+
namespace base {
class FilePath;
}
@@ -34,7 +40,7 @@ class X509Certificate;
// TestRootCerts is a helper class for unit tests that is used to
// artificially mark a certificate as trusted, independent of the local
// machine configuration.
-class NET_EXPORT_PRIVATE TestRootCerts {
+class NET_EXPORT TestRootCerts {
public:
// Obtains the Singleton instance to the trusted certificates.
static TestRootCerts* GetInstance();
@@ -58,7 +64,9 @@ class NET_EXPORT_PRIVATE TestRootCerts {
// Returns true if there are no certificates that have been marked trusted.
bool IsEmpty() const;
-#if defined(OS_MACOSX) && !defined(OS_IOS)
+#if defined(USE_NSS)
+ bool Contains(CERTCertificate* cert) const;
+#elif defined(OS_MACOSX) && !defined(OS_IOS)
CFArrayRef temporary_roots() const { return temporary_roots_; }
// Modifies the root certificates of |trust_ref| to include the
@@ -73,6 +81,7 @@ class NET_EXPORT_PRIVATE TestRootCerts {
#elif defined(USE_OPENSSL) && !defined(OS_ANDROID)
const std::vector<scoped_refptr<X509Certificate> >&
temporary_roots() const { return temporary_roots_; }
+ bool Contains(X509* cert) const;
#elif defined(OS_WIN)
HCERTSTORE temporary_roots() const { return temporary_roots_; }
« no previous file with comments | « net/cert/nss_profile_filter_chromeos_unittest.cc ('k') | net/cert/test_root_certs_nss.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698