Index: net/BUILD.gn |
diff --git a/net/BUILD.gn b/net/BUILD.gn |
index cde05e271903225817aa0013b50d4addace0ec87..0dea5e7e07b57d324ae819cd192b6dd7ac8ba208 100644 |
--- a/net/BUILD.gn |
+++ b/net/BUILD.gn |
@@ -39,10 +39,6 @@ enable_built_in_dns = !is_ios |
enable_ftp_support = !is_ios |
-# When OpenSSL is used for SSL and crypto on Unix-like systems, use OpenSSL"s |
-# certificate definition. |
-use_openssl_certs = (is_linux || is_android) && use_openssl |
- |
config("net_config") { |
defines = [] |
if (posix_avoid_mmap) { |
@@ -268,10 +264,7 @@ component("net") { |
"cert/cert_database_nss.cc", |
"cert/nss_cert_database.cc", |
"cert/nss_cert_database.h", |
- "cert/test_root_certs_nss.cc", |
"cert/x509_certificate_nss.cc", |
- "ocsp/nss_ocsp.cc", |
- "ocsp/nss_ocsp.h", |
"third_party/mozilla_security_manager/nsKeygenHandler.cpp", |
"third_party/mozilla_security_manager/nsKeygenHandler.h", |
"third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", |
@@ -279,15 +272,31 @@ component("net") { |
"third_party/mozilla_security_manager/nsPKCS12Blob.cpp", |
"third_party/mozilla_security_manager/nsPKCS12Blob.h", |
] |
+ |
+ if (!is_ios) { |
+ # These files are part of the partial implementation of NSS on iOS so |
+ # keep them in that case. |
+ sources -= [ |
+ "cert/test_root_certs_nss.cc", |
+ "ocsp/nss_ocsp.cc", |
+ "ocsp/nss_ocsp.h", |
+ ] |
+ } |
} |
- if (use_openssl) { |
+ if (!use_nss_certs) { |
sources -= [ |
- "cert/cert_verify_proc_nss.cc", |
- "cert/cert_verify_proc_nss.h", |
"ssl/client_cert_store_nss.cc", |
"ssl/client_cert_store_nss.h", |
] |
+ if (!is_ios) { |
+ # These files are part of the partial implementation of NSS on iOS so |
+ # keep them in that case (even though use_nss_certs is not set). |
+ sources -= [ |
+ "cert/cert_verify_proc_nss.cc", |
+ "cert/cert_verify_proc_nss.h", |
+ ] |
+ } |
if (is_chromeos) { |
# These were already removed on non-ChromeOS. |
sources -= [ |