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 import("//testing/test.gni") | 6 import("//testing/test.gni") |
7 | 7 |
8 component("crypto") { | 8 component("crypto") { |
9 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. | 9 output_name = "crcrypto" # Avoid colliding with OpenSSL's libcrypto. |
10 sources = [ | 10 sources = [ |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 "hmac_openssl.cc", | 43 "hmac_openssl.cc", |
44 "mac_security_services_lock.cc", | 44 "mac_security_services_lock.cc", |
45 "mac_security_services_lock.h", | 45 "mac_security_services_lock.h", |
46 | 46 |
47 # TODO(brettw) these mocks should be moved to a test_support_crypto target | 47 # TODO(brettw) these mocks should be moved to a test_support_crypto target |
48 # if possible. | 48 # if possible. |
49 "mock_apple_keychain.cc", | 49 "mock_apple_keychain.cc", |
50 "mock_apple_keychain.h", | 50 "mock_apple_keychain.h", |
51 "mock_apple_keychain_ios.cc", | 51 "mock_apple_keychain_ios.cc", |
52 "mock_apple_keychain_mac.cc", | 52 "mock_apple_keychain_mac.cc", |
53 "nss_key_util.cc", | |
54 "nss_key_util.h", | |
55 "nss_util.cc", | 53 "nss_util.cc", |
56 "nss_util.h", | 54 "nss_util.h", |
57 "nss_util_internal.h", | 55 "nss_util_internal.h", |
58 "openssl_bio_string.cc", | 56 "openssl_bio_string.cc", |
59 "openssl_bio_string.h", | 57 "openssl_bio_string.h", |
60 "openssl_util.cc", | 58 "openssl_util.cc", |
61 "openssl_util.h", | 59 "openssl_util.h", |
62 "p224.cc", | 60 "p224.cc", |
63 "p224.h", | 61 "p224.h", |
64 "p224_spake.cc", | 62 "p224_spake.cc", |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
166 "openssl_util.cc", | 164 "openssl_util.cc", |
167 "openssl_util.h", | 165 "openssl_util.h", |
168 "rsa_private_key_openssl.cc", | 166 "rsa_private_key_openssl.cc", |
169 "secure_hash_openssl.cc", | 167 "secure_hash_openssl.cc", |
170 "signature_creator_openssl.cc", | 168 "signature_creator_openssl.cc", |
171 "signature_verifier_openssl.cc", | 169 "signature_verifier_openssl.cc", |
172 "symmetric_key_openssl.cc", | 170 "symmetric_key_openssl.cc", |
173 ] | 171 ] |
174 } | 172 } |
175 | 173 |
176 # Some files are built when NSS is used at all, either for the internal crypto | 174 # Remove nss_util when NSS is used for neither the internal crypto library |
177 # library or the platform certificate library. | 175 # nor the platform certificate library. |
178 if (use_openssl && !use_nss_certs) { | 176 if (use_openssl && !use_nss_certs) { |
179 sources -= [ | 177 sources -= [ |
180 "nss_key_util.cc", | |
181 "nss_key_util.h", | |
182 "nss_util.cc", | 178 "nss_util.cc", |
183 "nss_util.h", | 179 "nss_util.h", |
184 "nss_util_internal.h", | 180 "nss_util_internal.h", |
185 ] | 181 ] |
186 } | 182 } |
187 | 183 |
188 defines = [ "CRYPTO_IMPLEMENTATION" ] | 184 defines = [ "CRYPTO_IMPLEMENTATION" ] |
189 } | 185 } |
190 | 186 |
191 # TODO(GYP): TODO(dpranke), fix the compile errors for this stuff | 187 # TODO(GYP): TODO(dpranke), fix the compile errors for this stuff |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
223 test("crypto_unittests") { | 219 test("crypto_unittests") { |
224 sources = [ | 220 sources = [ |
225 # Tests. | 221 # Tests. |
226 "curve25519_unittest.cc", | 222 "curve25519_unittest.cc", |
227 "ec_private_key_unittest.cc", | 223 "ec_private_key_unittest.cc", |
228 "ec_signature_creator_unittest.cc", | 224 "ec_signature_creator_unittest.cc", |
229 "encryptor_unittest.cc", | 225 "encryptor_unittest.cc", |
230 "ghash_unittest.cc", | 226 "ghash_unittest.cc", |
231 "hkdf_unittest.cc", | 227 "hkdf_unittest.cc", |
232 "hmac_unittest.cc", | 228 "hmac_unittest.cc", |
233 "nss_key_util_unittest.cc", | |
234 "nss_util_unittest.cc", | 229 "nss_util_unittest.cc", |
235 "openssl_bio_string_unittest.cc", | 230 "openssl_bio_string_unittest.cc", |
236 "p224_spake_unittest.cc", | 231 "p224_spake_unittest.cc", |
237 "p224_unittest.cc", | 232 "p224_unittest.cc", |
238 "random_unittest.cc", | 233 "random_unittest.cc", |
| 234 "rsa_private_key_nss_unittest.cc", |
239 "rsa_private_key_unittest.cc", | 235 "rsa_private_key_unittest.cc", |
240 "secure_hash_unittest.cc", | 236 "secure_hash_unittest.cc", |
241 "sha2_unittest.cc", | 237 "sha2_unittest.cc", |
242 "signature_creator_unittest.cc", | 238 "signature_creator_unittest.cc", |
243 "signature_verifier_unittest.cc", | 239 "signature_verifier_unittest.cc", |
244 "symmetric_key_unittest.cc", | 240 "symmetric_key_unittest.cc", |
245 ] | 241 ] |
246 | 242 |
247 # Some files are built when NSS is used at all, either for the internal crypto | 243 # Remove nss_util when NSS is used for neither the internal crypto library |
248 # library or the platform certificate library. | 244 # nor the platform certificate library. |
249 if (use_openssl && !use_nss_certs) { | 245 if (use_openssl && !use_nss_certs) { |
250 sources -= [ | 246 sources -= [ "nss_util_unittest.cc" ] |
251 "nss_key_util_unittest.cc", | |
252 "nss_util_unittest.cc", | |
253 ] | |
254 } | 247 } |
255 | 248 |
256 if (!use_openssl) { | 249 if (use_openssl) { |
| 250 sources -= [ "rsa_private_key_nss_unittest.cc" ] |
| 251 } else { |
257 sources -= [ "openssl_bio_string_unittest.cc" ] | 252 sources -= [ "openssl_bio_string_unittest.cc" ] |
258 } | 253 } |
259 | 254 |
260 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] | 255 configs += [ "//build/config/compiler:no_size_t_to_int_warning" ] |
261 | 256 |
262 deps = [ | 257 deps = [ |
263 ":crypto", | 258 ":crypto", |
264 ":platform", | 259 ":platform", |
265 ":test_support", | 260 ":test_support", |
266 "//base", | 261 "//base", |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
345 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] | 340 public_configs += [ "//third_party/nss:system_nss_no_ssl_config" ] |
346 } else { | 341 } else { |
347 # Non-Linux platforms use the hermetic NSS from the tree. | 342 # Non-Linux platforms use the hermetic NSS from the tree. |
348 deps += [ | 343 deps += [ |
349 "//third_party/nss:nspr", | 344 "//third_party/nss:nspr", |
350 "//third_party/nss:nss", | 345 "//third_party/nss:nss", |
351 ] | 346 ] |
352 } | 347 } |
353 } | 348 } |
354 } | 349 } |
OLD | NEW |