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

Unified Diff: net/tools/cert_verify_tool/verify_using_path_builder.cc

Issue 2585963003: PKI library Mac trust store integration (Closed)
Patch Set: review changes for comment #19 Created 3 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/tools/cert_verify_tool/verify_using_path_builder.cc
diff --git a/net/tools/cert_verify_tool/verify_using_path_builder.cc b/net/tools/cert_verify_tool/verify_using_path_builder.cc
index b94a08e35d5bf03ab08e7c971fe0250603a9475e..2568a535e5dd9b37e7ff95673f182486cac2aa12 100644
--- a/net/tools/cert_verify_tool/verify_using_path_builder.cc
+++ b/net/tools/cert_verify_tool/verify_using_path_builder.cc
@@ -38,6 +38,11 @@
#include "net/proxy/proxy_config_service_fixed.h"
#endif
+#if defined(OS_MACOSX) && !defined(OS_IOS)
+#include <Security/Security.h>
+#include "net/cert/internal/trust_store_mac.h"
+#endif
+
namespace {
std::string GetUserAgent() {
@@ -228,6 +233,9 @@ bool VerifyUsingPathBuilder(
#if defined(USE_NSS_CERTS)
net::TrustStoreNSS trust_store_nss(trustSSL);
trust_store.AddTrustStore(&trust_store_nss);
+#elif defined(OS_MACOSX) && !defined(OS_IOS)
+ net::TrustStoreMac trust_store_mac(kSecPolicyAppleSSL);
+ trust_store.AddTrustStore(&trust_store_mac);
#else
if (root_der_certs.empty()) {
std::cerr << "NOTE: CertPathBuilder does not currently use OS trust "

Powered by Google App Engine
This is Rietveld 408576698