OLD | NEW |
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. |
2 # Use of this source code is governed by a BSD-style license that can be | 2 # Use of this source code is governed by a BSD-style license that can be |
3 # found in the LICENSE file. | 3 # found in the LICENSE file. |
4 | 4 |
5 import("//build/config/crypto.gni") | 5 import("//build/config/crypto.gni") |
6 | 6 |
7 component("crypto") { | 7 component("crypto") { |
8 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. | 8 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. |
9 sources = [ | 9 sources = [ |
10 "apple_keychain.h", | 10 "apple_keychain.h", |
(...skipping 22 matching lines...) Expand all Loading... |
33 "ghash.cc", | 33 "ghash.cc", |
34 "ghash.h", | 34 "ghash.h", |
35 "hkdf.cc", | 35 "hkdf.cc", |
36 "hkdf.h", | 36 "hkdf.h", |
37 "hmac.cc", | 37 "hmac.cc", |
38 "hmac.h", | 38 "hmac.h", |
39 "hmac_nss.cc", | 39 "hmac_nss.cc", |
40 "hmac_openssl.cc", | 40 "hmac_openssl.cc", |
41 "mac_security_services_lock.cc", | 41 "mac_security_services_lock.cc", |
42 "mac_security_services_lock.h", | 42 "mac_security_services_lock.h", |
| 43 |
43 # TODO(brettw) these mocks should be moved to a test_support_crypto target | 44 # TODO(brettw) these mocks should be moved to a test_support_crypto target |
44 # if possible. | 45 # if possible. |
45 "mock_apple_keychain.cc", | 46 "mock_apple_keychain.cc", |
46 "mock_apple_keychain.h", | 47 "mock_apple_keychain.h", |
47 "mock_apple_keychain_ios.cc", | 48 "mock_apple_keychain_ios.cc", |
48 "mock_apple_keychain_mac.cc", | 49 "mock_apple_keychain_mac.cc", |
49 "nss_util.cc", | 50 "nss_util.cc", |
50 "nss_util.h", | 51 "nss_util.h", |
51 "nss_util_internal.h", | 52 "nss_util_internal.h", |
52 "openssl_bio_string.cc", | 53 "openssl_bio_string.cc", |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
225 "rsa_private_key_unittest.cc", | 226 "rsa_private_key_unittest.cc", |
226 "rsa_private_key_nss_unittest.cc", | 227 "rsa_private_key_nss_unittest.cc", |
227 "secure_hash_unittest.cc", | 228 "secure_hash_unittest.cc", |
228 "sha2_unittest.cc", | 229 "sha2_unittest.cc", |
229 "signature_creator_unittest.cc", | 230 "signature_creator_unittest.cc", |
230 "signature_verifier_unittest.cc", | 231 "signature_verifier_unittest.cc", |
231 "symmetric_key_unittest.cc", | 232 "symmetric_key_unittest.cc", |
232 ] | 233 ] |
233 | 234 |
234 if (use_openssl || !is_linux) { | 235 if (use_openssl || !is_linux) { |
235 sources -= [ | 236 sources -= [ "rsa_private_key_nss_unittest.cc" ] |
236 "rsa_private_key_nss_unittest.cc", | |
237 ] | |
238 } | 237 } |
239 | 238 |
240 if (use_openssl) { | 239 if (use_openssl) { |
241 sources -= [ "nss_util_unittest.cc" ] | 240 sources -= [ "nss_util_unittest.cc" ] |
242 } else { | 241 } else { |
243 sources -= [ "openssl_bio_string_unittest.cc" ] | 242 sources -= [ "openssl_bio_string_unittest.cc" ] |
244 } | 243 } |
245 | 244 |
246 deps = [ | 245 deps = [ |
247 ":crypto", | 246 ":crypto", |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 "scoped_test_system_nss_key_slot.h", | 285 "scoped_test_system_nss_key_slot.h", |
287 ] | 286 ] |
288 } | 287 } |
289 } | 288 } |
290 | 289 |
291 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, | 290 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, |
292 # according to the state of the crypto flags. A target just wanting to depend | 291 # according to the state of the crypto flags. A target just wanting to depend |
293 # on the current SSL library should just depend on this. | 292 # on the current SSL library should just depend on this. |
294 group("platform") { | 293 group("platform") { |
295 if (use_openssl) { | 294 if (use_openssl) { |
296 deps = [ "//third_party/boringssl" ] | 295 deps = [ |
| 296 "//third_party/boringssl", |
| 297 ] |
297 } else { | 298 } else { |
298 deps = [ "//net/third_party/nss/ssl:libssl" ] | 299 deps = [ |
| 300 "//net/third_party/nss/ssl:libssl", |
| 301 ] |
299 if (is_linux) { | 302 if (is_linux) { |
300 # On Linux, we use the system NSS (excepting SSL where we always use our | 303 # On Linux, we use the system NSS (excepting SSL where we always use our |
301 # own). | 304 # own). |
302 # | 305 # |
303 # We always need our SSL header search path to come before the system one | 306 # We always need our SSL header search path to come before the system one |
304 # so our versions are used. The libssl target will add the search path we | 307 # so our versions are used. The libssl target will add the search path we |
305 # want, but according to GN's ordering rules, public_configs' search path | 308 # want, but according to GN's ordering rules, public_configs' search path |
306 # will get applied before ones inherited from our dependencies. | 309 # will get applied before ones inherited from our dependencies. |
307 # Therefore, we need to explicitly list our custom libssl's config here | 310 # Therefore, we need to explicitly list our custom libssl's config here |
308 # before the system one. | 311 # before the system one. |
309 public_configs = [ | 312 public_configs = [ |
310 "//net/third_party/nss/ssl:ssl_config", | 313 "//net/third_party/nss/ssl:ssl_config", |
311 "//third_party/nss:system_nss_no_ssl_config", | 314 "//third_party/nss:system_nss_no_ssl_config", |
312 ] | 315 ] |
313 } else { | 316 } else { |
314 # Non-Linux platforms use the hermetic NSS from the tree. | 317 # Non-Linux platforms use the hermetic NSS from the tree. |
315 deps += [ | 318 deps += [ |
316 "//third_party/nss:nspr", | 319 "//third_party/nss:nspr", |
317 "//third_party/nss:nss", | 320 "//third_party/nss:nss", |
318 ] | 321 ] |
319 } | 322 } |
320 } | 323 } |
321 } | 324 } |
OLD | NEW |