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