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_mac.cc

Issue 14492003: Work around GTE CyberTrust/Baltimore CyberTrust cross-signing issues (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: With unittests Created 7 years, 8 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_mac.cc
diff --git a/net/cert/test_root_certs_mac.cc b/net/cert/test_root_certs_mac.cc
index 18ae0d610ad77ef1cb6a9c89d8d1fa05ccb26fa8..57533c35a63d10d9d19c05fbdefc413b6be7f370 100644
--- a/net/cert/test_root_certs_mac.cc
+++ b/net/cert/test_root_certs_mac.cc
@@ -71,7 +71,11 @@ OSStatus TestRootCerts::FixupSecTrustRef(SecTrustRef trust_ref) const {
OSStatus status = SecTrustSetAnchorCertificates(trust_ref, temporary_roots_);
if (status)
return status;
- return SecTrustSetAnchorCertificatesOnly(trust_ref, false);
+ return SecTrustSetAnchorCertificatesOnly(trust_ref, !allow_system_trust_);
+}
+
+void TestRootCerts::SetAllowSystemTrust(bool allow_system_trust) {
+ allow_system_trust_ = allow_system_trust;
}
TestRootCerts::~TestRootCerts() {}
@@ -79,6 +83,7 @@ TestRootCerts::~TestRootCerts() {}
void TestRootCerts::Init() {
temporary_roots_.reset(CFArrayCreateMutable(kCFAllocatorDefault, 0,
&kCertArrayCallbacks));
+ allow_system_trust_ = true;
wtc 2013/04/29 19:14:57 Is it convenient to initialize allow_system_trust_
Ryan Sleevi 2013/04/29 21:28:23 No. We use |Init()| to handle the per-OS initializ
wtc 2013/04/29 22:53:42 I see. I didn't know that (I didn't check test_roo
}
} // namespace net

Powered by Google App Engine
This is Rietveld 408576698