| 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 88 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 ] | 99 ] |
| 100 | 100 |
| 101 if (!is_mac && !is_ios) { | 101 if (!is_mac && !is_ios) { |
| 102 sources -= [ | 102 sources -= [ |
| 103 "apple_keychain.h", | 103 "apple_keychain.h", |
| 104 "mock_apple_keychain.cc", | 104 "mock_apple_keychain.cc", |
| 105 "mock_apple_keychain.h", | 105 "mock_apple_keychain.h", |
| 106 ] | 106 ] |
| 107 } | 107 } |
| 108 | 108 |
| 109 if (!is_linux) { | 109 if (use_openssl || !is_linux) { |
| 110 sources -= [ | 110 sources -= [ |
| 111 "openpgp_symmetric_encryption.cc", | 111 "openpgp_symmetric_encryption.cc", |
| 112 "openpgp_symmetric_encryption.h", | 112 "openpgp_symmetric_encryption.h", |
| 113 ] | 113 ] |
| 114 if (use_nss) { # Removed for non-NSS in all cases below. | |
| 115 sources -= [ | |
| 116 "openpgp_symmetric_encryption.cc", | |
| 117 "openpgp_symmetric_encryption.h", | |
| 118 ] | |
| 119 } | |
| 120 } | 114 } |
| 121 if (!is_mac) { | 115 if (!is_mac) { |
| 122 sources -= [ | 116 sources -= [ |
| 123 "cssm_init.cc", | 117 "cssm_init.cc", |
| 124 "cssm_init.h", | 118 "cssm_init.h", |
| 125 "mac_security_services_lock.cc", | 119 "mac_security_services_lock.cc", |
| 126 "mac_security_services_lock.h", | 120 "mac_security_services_lock.h", |
| 127 ] | 121 ] |
| 128 } | 122 } |
| 129 if (!is_win) { | 123 if (!is_win) { |
| 130 sources -= [ | 124 sources -= [ |
| 131 "capi_util.cc", | 125 "capi_util.cc", |
| 132 "capi_util.h", | 126 "capi_util.h", |
| 133 ] | 127 ] |
| 134 } | 128 } |
| 135 | 129 |
| 136 if (!use_nss) { | 130 if (use_openssl) { |
| 131 # Remove NSS files when using OpenSSL |
| 137 sources -= [ | 132 sources -= [ |
| 138 "ec_private_key_nss.cc", | 133 "ec_private_key_nss.cc", |
| 139 "ec_signature_creator_nss.cc", | 134 "ec_signature_creator_nss.cc", |
| 140 "encryptor_nss.cc", | 135 "encryptor_nss.cc", |
| 141 "hmac_nss.cc", | 136 "hmac_nss.cc", |
| 142 "nss_util.cc", | 137 "nss_util.cc", |
| 143 "nss_util.h", | 138 "nss_util.h", |
| 144 "rsa_private_key_nss.cc", | 139 "rsa_private_key_nss.cc", |
| 145 "secure_hash_default.cc", | 140 "secure_hash_default.cc", |
| 146 "signature_creator_nss.cc", | 141 "signature_creator_nss.cc", |
| 147 "signature_verifier_nss.cc", | 142 "signature_verifier_nss.cc", |
| 148 "symmetric_key_nss.cc", | 143 "symmetric_key_nss.cc", |
| 149 "third_party/nss/chromium-blapi.h", | 144 "third_party/nss/chromium-blapi.h", |
| 150 "third_party/nss/chromium-blapit.h", | 145 "third_party/nss/chromium-blapit.h", |
| 151 "third_party/nss/chromium-nss.h", | 146 "third_party/nss/chromium-nss.h", |
| 152 "third_party/nss/pk11akey.cc", | 147 "third_party/nss/pk11akey.cc", |
| 153 "third_party/nss/rsawrapr.c", | 148 "third_party/nss/rsawrapr.c", |
| 154 "third_party/nss/secsign.cc", | 149 "third_party/nss/secsign.cc", |
| 155 ] | 150 ] |
| 156 } | 151 } else { |
| 157 if (!use_openssl) { | 152 # Remove OpenSSL when using NSS. |
| 158 sources -= [ | 153 sources -= [ |
| 159 "ec_private_key_openssl.cc", | 154 "ec_private_key_openssl.cc", |
| 160 "ec_signature_creator_openssl.cc", | 155 "ec_signature_creator_openssl.cc", |
| 161 "encryptor_openssl.cc", | 156 "encryptor_openssl.cc", |
| 162 "hmac_openssl.cc", | 157 "hmac_openssl.cc", |
| 163 "openssl_util.cc", | 158 "openssl_util.cc", |
| 164 "openssl_util.h", | 159 "openssl_util.h", |
| 165 "rsa_private_key_openssl.cc", | 160 "rsa_private_key_openssl.cc", |
| 166 "secure_hash_openssl.cc", | 161 "secure_hash_openssl.cc", |
| 167 "signature_creator_openssl.cc", | 162 "signature_creator_openssl.cc", |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 277 ] | 272 ] |
| 278 } else { | 273 } else { |
| 279 # Non-Linux platforms use the hermetic NSS from the tree. | 274 # Non-Linux platforms use the hermetic NSS from the tree. |
| 280 deps += [ | 275 deps += [ |
| 281 "//third_party/nss:nspr", | 276 "//third_party/nss:nspr", |
| 282 "//third_party/nss:nss", | 277 "//third_party/nss:nss", |
| 283 ] | 278 ] |
| 284 } | 279 } |
| 285 } | 280 } |
| 286 } | 281 } |
| OLD | NEW |