1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file.
8 # Put all transitive dependencies for Windows HMAC here.
9 # This is required so that we can build them for nacl win64.
10 'hmac_win64_related_sources': [
17 'symmetric_key_win.cc',
18 'third_party/nss/chromium-sha256.h',
19 'third_party/nss/sha512.cc',
24 'target_name': 'crypto',
25 'type': '<(component)',
26 'product_name': 'crcrypto', # Avoid colliding with OpenSSL's libcrypto
28 '../base/base.gyp:base',
29 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
32 'CRYPTO_IMPLEMENTATION',
34 'msvs_disabled_warnings': [
38 [ 'os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
40 '../build/linux/system.gyp:ssl',
42 'export_dependent_settings': [
43 '../build/linux/system.gyp:ssl',
47 'sources/': [ ['include', '_chromeos\\.cc$'] ]
51 }, { # os_posix != 1 or OS == "mac" or OS == "ios" or OS == "android"
53 ['exclude', '_nss\.cc$'],
54 ['include', 'ec_private_key_nss\.cc$'],
55 ['include', 'ec_signature_creator_nss\.cc$'],
56 ['include', 'encryptor_nss\.cc$'],
57 ['include', 'hmac_nss\.cc$'],
58 ['include', 'signature_verifier_nss\.cc$'],
59 ['include', 'symmetric_key_nss\.cc$'],
63 'openpgp_symmetric_encryption.cc',
64 'openpgp_symmetric_encryption.h',
65 'symmetric_key_win.cc',
68 [ 'OS != "mac" and OS != "ios"', {
71 'mock_apple_keychain.cc',
72 'mock_apple_keychain.h',
75 [ 'OS == "android"', {
77 '../third_party/openssl/openssl.gyp:openssl',
80 ['exclude', 'ec_private_key_nss\.cc$'],
81 ['exclude', 'ec_signature_creator_nss\.cc$'],
82 ['exclude', 'encryptor_nss\.cc$'],
83 ['exclude', 'hmac_nss\.cc$'],
84 ['exclude', 'signature_verifier_nss\.cc$'],
85 ['exclude', 'symmetric_key_nss\.cc$'],
91 '-L/usr/local/lib -lexecinfo',
98 # This class is stubbed out on iOS.
105 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
112 'mac_security_services_lock.cc',
113 'mac_security_services_lock.h',
116 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
118 '../third_party/nss/nss.gyp:nspr',
119 '../third_party/nss/nss.gyp:nss',
121 'export_dependent_settings': [
122 '../third_party/nss/nss.gyp:nspr',
123 '../third_party/nss/nss.gyp:nss',
133 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
134 'msvs_disabled_warnings': [4267, ],
136 [ 'use_openssl==1', {
137 # TODO(joth): Use a glob to match exclude patterns once the
138 # OpenSSL file set is complete.
140 'ec_private_key_nss.cc',
141 'ec_signature_creator_nss.cc',
146 'openpgp_symmetric_encryption.cc',
147 'rsa_private_key_nss.cc',
148 'secure_hash_default.cc',
149 'signature_creator_nss.cc',
150 'signature_verifier_nss.cc',
151 'symmetric_key_nss.cc',
152 'third_party/nss/chromium-blapi.h',
153 'third_party/nss/chromium-blapit.h',
154 'third_party/nss/chromium-nss.h',
155 'third_party/nss/chromium-sha256.h',
156 'third_party/nss/pk11akey.cc',
157 'third_party/nss/secsign.cc',
158 'third_party/nss/sha512.cc',
162 'ec_private_key_openssl.cc',
163 'ec_signature_creator_openssl.cc',
164 'encryptor_openssl.cc',
168 'rsa_private_key_openssl.cc',
169 'secure_hash_openssl.cc',
170 'signature_creator_openssl.cc',
171 'signature_verifier_openssl.cc',
172 'symmetric_key_openssl.cc',
177 # NOTE: all transitive dependencies of HMAC on windows need
178 # to be placed in the source list above.
179 '<@(hmac_win64_related_sources)',
181 'apple_keychain_ios.mm',
182 'apple_keychain_mac.mm',
186 'crypto_module_blocking_password_delegate.h',
191 'curve25519-donna.c',
195 'ec_private_key_nss.cc',
196 'ec_private_key_openssl.cc',
197 'ec_signature_creator.cc',
198 'ec_signature_creator.h',
199 'ec_signature_creator_impl.h',
200 'ec_signature_creator_nss.cc',
201 'ec_signature_creator_openssl.cc',
205 'encryptor_openssl.cc',
210 'mac_security_services_lock.cc',
211 'mac_security_services_lock.h',
212 'mock_apple_keychain.cc',
213 'mock_apple_keychain.h',
214 'mock_apple_keychain_ios.cc',
215 'mock_apple_keychain_mac.cc',
220 'nss_util_internal.h',
221 'openpgp_symmetric_encryption.cc',
222 'openpgp_symmetric_encryption.h',
229 'rsa_private_key.cc',
231 'rsa_private_key_ios.cc',
232 'rsa_private_key_mac.cc',
233 'rsa_private_key_nss.cc',
234 'rsa_private_key_openssl.cc',
235 'rsa_private_key_win.cc',
236 'scoped_capi_types.h',
237 'scoped_nss_types.h',
239 'secure_hash_default.cc',
240 'secure_hash_openssl.cc',
243 'signature_creator.h',
244 'signature_creator_mac.cc',
245 'signature_creator_nss.cc',
246 'signature_creator_openssl.cc',
247 'signature_creator_win.cc',
248 'signature_verifier.h',
249 'signature_verifier_nss.cc',
250 'signature_verifier_openssl.cc',
251 'symmetric_key_nss.cc',
252 'symmetric_key_openssl.cc',
253 'third_party/nss/chromium-blapi.h',
254 'third_party/nss/chromium-blapit.h',
255 'third_party/nss/chromium-nss.h',
256 'third_party/nss/pk11akey.cc',
257 'third_party/nss/secsign.cc',
261 'target_name': 'crypto_unittests',
262 'type': 'executable',
264 # Infrastructure files.
265 'run_all_unittests.cc',
268 'curve25519_unittest.cc',
269 'ec_private_key_unittest.cc',
270 'ec_signature_creator_unittest.cc',
271 'encryptor_unittest.cc',
275 'nss_util_unittest.cc',
277 'p224_spake_unittest.cc',
278 'random_unittest.cc',
279 'rsa_private_key_unittest.cc',
280 'rsa_private_key_nss_unittest.cc',
281 'secure_hash_unittest.cc',
283 'signature_creator_unittest.cc',
284 'signature_verifier_unittest.cc',
285 'symmetric_key_unittest.cc',
286 'openpgp_symmetric_encryption_unittest.cc',
290 '../base/base.gyp:base',
291 '../base/base.gyp:test_support_base',
292 '../testing/gmock.gyp:gmock',
293 '../testing/gtest.gyp:gtest',
296 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
298 [ 'linux_use_tcmalloc==1', {
300 '../base/allocator/allocator.gyp:allocator',
306 '../build/linux/system.gyp:ssl',
308 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
310 'rsa_private_key_nss_unittest.cc',
311 'openpgp_symmetric_encryption_unittest.cc',
314 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
316 '../third_party/nss/nss.gyp:nss',
321 # These tests are excluded because they test classes that are not
322 # implemented on iOS.
323 'rsa_private_key_unittest.cc',
324 'signature_creator_unittest.cc',
325 'signature_verifier_unittest.cc',
330 '../third_party/nss/nss.gyp:nspr',
334 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
335 'msvs_disabled_warnings': [4267, ],
337 [ 'use_openssl==1', {
339 'nss_util_unittest.cc',
340 'openpgp_symmetric_encryption_unittest.cc',
341 'rsa_private_key_nss_unittest.cc',
348 ['OS == "win" and target_arch=="ia32"', {
351 'target_name': 'crypto_nacl_win64',
352 # We do not want nacl_helper to depend on NSS because this would
353 # require including a 64-bit copy of NSS. Thus, use the native APIs
355 'type': '<(component)',
357 '../base/base.gyp:base_nacl_win64',
358 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
361 '<@(hmac_win64_related_sources)',
364 'CRYPTO_IMPLEMENTATION',
365 '<@(nacl_win64_defines)',
367 'msvs_disabled_warnings': [
372 'msvs_target_platform': 'x64',