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 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
124 | 124 |
125 if (use_openssl) { | 125 if (use_openssl) { |
126 # Remove NSS files when using OpenSSL | 126 # Remove NSS files when using OpenSSL |
127 sources -= [ | 127 sources -= [ |
128 "ec_private_key_nss.cc", | 128 "ec_private_key_nss.cc", |
129 "ec_signature_creator_nss.cc", | 129 "ec_signature_creator_nss.cc", |
130 "encryptor_nss.cc", | 130 "encryptor_nss.cc", |
131 "hmac_nss.cc", | 131 "hmac_nss.cc", |
132 "nss_util.cc", | 132 "nss_util.cc", |
133 "nss_util.h", | 133 "nss_util.h", |
| 134 "nss_util_internal.h", |
134 "rsa_private_key_nss.cc", | 135 "rsa_private_key_nss.cc", |
135 "secure_hash_default.cc", | 136 "secure_hash_default.cc", |
136 "signature_creator_nss.cc", | 137 "signature_creator_nss.cc", |
137 "signature_verifier_nss.cc", | 138 "signature_verifier_nss.cc", |
138 "symmetric_key_nss.cc", | 139 "symmetric_key_nss.cc", |
139 "third_party/nss/chromium-blapi.h", | 140 "third_party/nss/chromium-blapi.h", |
140 "third_party/nss/chromium-blapit.h", | 141 "third_party/nss/chromium-blapit.h", |
141 "third_party/nss/chromium-nss.h", | 142 "third_party/nss/chromium-nss.h", |
142 "third_party/nss/pk11akey.cc", | 143 "third_party/nss/pk11akey.cc", |
143 "third_party/nss/rsawrapr.c", | 144 "third_party/nss/rsawrapr.c", |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
222 ] | 223 ] |
223 } | 224 } |
224 | 225 |
225 if (use_openssl) { | 226 if (use_openssl) { |
226 sources -= [ "nss_util_unittest.cc" ] | 227 sources -= [ "nss_util_unittest.cc" ] |
227 } | 228 } |
228 | 229 |
229 deps = [ | 230 deps = [ |
230 ":crypto", | 231 ":crypto", |
231 ":platform", | 232 ":platform", |
| 233 ":test_support", |
232 "//base", | 234 "//base", |
233 "//base/test:run_all_unittests", | 235 "//base/test:run_all_unittests", |
234 "//base/test:test_support", | 236 "//base/test:test_support", |
235 "//testing/gmock", | 237 "//testing/gmock", |
236 "//testing/gtest", | 238 "//testing/gtest", |
237 ] | 239 ] |
238 } | 240 } |
239 | 241 |
| 242 source_set("test_support") { |
| 243 sources = [ |
| 244 "scoped_test_nss_db.cc", |
| 245 "scoped_test_nss_db.h", |
| 246 "scoped_test_nss_chromeos_user.cc", |
| 247 "scoped_test_nss_chromeos_user.h", |
| 248 "scoped_test_system_nss_key_slot.cc", |
| 249 "scoped_test_system_nss_key_slot.h", |
| 250 ] |
| 251 deps = [ |
| 252 ":crypto", |
| 253 ":platform", |
| 254 "//base", |
| 255 ] |
| 256 |
| 257 if (!use_nss_certs) { |
| 258 sources -= [ |
| 259 "scoped_test_nss_db.cc", |
| 260 "scoped_test_nss_db.h", |
| 261 ] |
| 262 } |
| 263 |
| 264 if (!is_chromeos) { |
| 265 sources -= [ |
| 266 "scoped_test_nss_chromeos_user.cc", |
| 267 "scoped_test_nss_chromeos_user.h", |
| 268 "scoped_test_system_nss_key_slot.cc", |
| 269 "scoped_test_system_nss_key_slot.h", |
| 270 ] |
| 271 } |
| 272 } |
| 273 |
240 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, | 274 # This is a meta-target that forwards to NSS's SSL library or OpenSSL, |
241 # according to the state of the crypto flags. A target just wanting to depend | 275 # according to the state of the crypto flags. A target just wanting to depend |
242 # on the current SSL library should just depend on this. | 276 # on the current SSL library should just depend on this. |
243 group("platform") { | 277 group("platform") { |
244 if (use_openssl) { | 278 if (use_openssl) { |
245 deps = [ "//third_party/boringssl" ] | 279 deps = [ "//third_party/boringssl" ] |
246 } else { | 280 } else { |
247 deps = [ "//net/third_party/nss/ssl:libssl" ] | 281 deps = [ "//net/third_party/nss/ssl:libssl" ] |
248 if (is_linux) { | 282 if (is_linux) { |
249 # On Linux, we use the system NSS (excepting SSL where we always use our | 283 # On Linux, we use the system NSS (excepting SSL where we always use our |
(...skipping 11 matching lines...) Expand all Loading... |
261 ] | 295 ] |
262 } else { | 296 } else { |
263 # Non-Linux platforms use the hermetic NSS from the tree. | 297 # Non-Linux platforms use the hermetic NSS from the tree. |
264 deps += [ | 298 deps += [ |
265 "//third_party/nss:nspr", | 299 "//third_party/nss:nspr", |
266 "//third_party/nss:nss", | 300 "//third_party/nss:nss", |
267 ] | 301 ] |
268 } | 302 } |
269 } | 303 } |
270 } | 304 } |
OLD | NEW |