Index: crypto/BUILD.gn |
diff --git a/crypto/BUILD.gn b/crypto/BUILD.gn |
index f6c45aad72d3b55c99334d9c91bdca793a4699b1..65687570931a2449ffeb86ad75f482216809a211 100644 |
--- a/crypto/BUILD.gn |
+++ b/crypto/BUILD.gn |
@@ -138,9 +138,6 @@ component("crypto") { |
"ec_signature_creator_nss.cc", |
"encryptor_nss.cc", |
"hmac_nss.cc", |
- "nss_util.cc", |
- "nss_util.h", |
- "nss_util_internal.h", |
"rsa_private_key_nss.cc", |
"secure_hash_default.cc", |
"signature_creator_nss.cc", |
@@ -172,6 +169,14 @@ component("crypto") { |
] |
} |
+ if (use_openssl && !use_nss_certs) { |
+ sources -= [ |
+ "nss_util.cc", |
+ "nss_util.h", |
+ "nss_util_internal.h", |
+ ] |
+ } |
+ |
defines = [ "CRYPTO_IMPLEMENTATION" ] |
} |
@@ -233,13 +238,15 @@ if (!is_win) { |
"symmetric_key_unittest.cc", |
] |
- if (use_openssl || !is_linux) { |
+ if (use_openssl || !use_nss_certs) { |
sources -= [ "rsa_private_key_nss_unittest.cc" ] |
} |
- if (use_openssl) { |
+ if (!use_nss_certs) { |
sources -= [ "nss_util_unittest.cc" ] |
- } else { |
+ } |
+ |
+ if (!use_openssl) { |
sources -= [ "openssl_bio_string_unittest.cc" ] |
} |
@@ -300,6 +307,9 @@ group("platform") { |
deps = [ |
"//net/third_party/nss/ssl:libssl", |
] |
+ } |
+ |
+ if (use_nss_certs || !use_openssl) { |
if (is_linux) { |
# On Linux, we use the system NSS (excepting SSL where we always use our |
# own). |