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 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
161 "secure_hash_openssl.cc", | 161 "secure_hash_openssl.cc", |
162 "signature_creator_openssl.cc", | 162 "signature_creator_openssl.cc", |
163 "signature_verifier_openssl.cc", | 163 "signature_verifier_openssl.cc", |
164 "symmetric_key_openssl.cc", | 164 "symmetric_key_openssl.cc", |
165 ] | 165 ] |
166 } | 166 } |
167 | 167 |
168 defines = [ "CRYPTO_IMPLEMENTATION" ] | 168 defines = [ "CRYPTO_IMPLEMENTATION" ] |
169 } | 169 } |
170 | 170 |
171 if (is_win) { | 171 if (false && is_win) { |
172 # A minimal crypto subset for hmac-related stuff that small standalone | 172 # A minimal crypto subset for hmac-related stuff that small standalone |
173 # targets can use to reduce code size on Windows. This does not depend on | 173 # targets can use to reduce code size on Windows. This does not depend on |
174 # OpenSSL/NSS but will use Windows APIs for that functionality. | 174 # OpenSSL/NSS but will use Windows APIs for that functionality. |
175 source_set("crypto_minimal_win") { | 175 source_set("crypto_minimal_win") { |
176 sources = [ | 176 sources = [ |
177 "crypto_export.h", | 177 "crypto_export.h", |
178 "hmac.cc", | 178 "hmac.cc", |
179 "hmac.h", | 179 "hmac.h", |
180 "hmac_win.cc", | 180 "hmac_win.cc", |
181 "scoped_capi_types.h", | 181 "scoped_capi_types.h", |
182 "scoped_nss_types.h", | 182 "scoped_nss_types.h", |
183 "secure_util.cc", | 183 "secure_util.cc", |
184 "secure_util.h", | 184 "secure_util.h", |
185 "symmetric_key.h", | 185 "symmetric_key.h", |
186 "symmetric_key_win.cc", | 186 "symmetric_key_win.cc", |
187 "third_party/nss/chromium-blapi.h", | 187 "third_party/nss/chromium-blapi.h", |
188 "third_party/nss/chromium-sha256.h", | 188 "third_party/nss/chromium-sha256.h", |
189 "third_party/nss/sha512.cc", | 189 "third_party/nss/sha512.cc", |
190 ] | 190 ] |
191 | 191 |
192 deps = [ | 192 deps = [ |
193 "//base", | 193 "//base", |
194 "//base/third_party/dynamic_annotations", | 194 "//base/third_party/dynamic_annotations", |
195 ] | 195 ] |
196 | 196 |
197 defines = [ "CRYPTO_IMPLEMENTATION" ] | 197 defines = [ "CRYPTO_IMPLEMENTATION" ] |
198 } | 198 } |
199 } | 199 } |
200 | 200 |
| 201 if (!is_win) { |
201 test("crypto_unittests") { | 202 test("crypto_unittests") { |
202 sources = [ | 203 sources = [ |
203 # Tests. | 204 # Tests. |
204 "curve25519_unittest.cc", | 205 "curve25519_unittest.cc", |
205 "ec_private_key_unittest.cc", | 206 "ec_private_key_unittest.cc", |
206 "ec_signature_creator_unittest.cc", | 207 "ec_signature_creator_unittest.cc", |
207 "encryptor_unittest.cc", | 208 "encryptor_unittest.cc", |
208 "ghash_unittest.cc", | 209 "ghash_unittest.cc", |
209 "hkdf_unittest.cc", | 210 "hkdf_unittest.cc", |
210 "hmac_unittest.cc", | 211 "hmac_unittest.cc", |
(...skipping 27 matching lines...) Expand all Loading... |
238 ":crypto", | 239 ":crypto", |
239 ":platform", | 240 ":platform", |
240 ":test_support", | 241 ":test_support", |
241 "//base", | 242 "//base", |
242 "//base/test:run_all_unittests", | 243 "//base/test:run_all_unittests", |
243 "//base/test:test_support", | 244 "//base/test:test_support", |
244 "//testing/gmock", | 245 "//testing/gmock", |
245 "//testing/gtest", | 246 "//testing/gtest", |
246 ] | 247 ] |
247 } | 248 } |
| 249 } |
248 | 250 |
249 source_set("test_support") { | 251 source_set("test_support") { |
250 sources = [ | 252 sources = [ |
251 "scoped_test_nss_db.cc", | 253 "scoped_test_nss_db.cc", |
252 "scoped_test_nss_db.h", | 254 "scoped_test_nss_db.h", |
253 "scoped_test_nss_chromeos_user.cc", | 255 "scoped_test_nss_chromeos_user.cc", |
254 "scoped_test_nss_chromeos_user.h", | 256 "scoped_test_nss_chromeos_user.h", |
255 "scoped_test_system_nss_key_slot.cc", | 257 "scoped_test_system_nss_key_slot.cc", |
256 "scoped_test_system_nss_key_slot.h", | 258 "scoped_test_system_nss_key_slot.h", |
257 ] | 259 ] |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 ] | 304 ] |
303 } else { | 305 } else { |
304 # Non-Linux platforms use the hermetic NSS from the tree. | 306 # Non-Linux platforms use the hermetic NSS from the tree. |
305 deps += [ | 307 deps += [ |
306 "//third_party/nss:nspr", | 308 "//third_party/nss:nspr", |
307 "//third_party/nss:nss", | 309 "//third_party/nss:nss", |
308 ] | 310 ] |
309 } | 311 } |
310 } | 312 } |
311 } | 313 } |
OLD | NEW |