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"
54 'openpgp_symmetric_encryption.cc',
55 'openpgp_symmetric_encryption.h',
56 'symmetric_key_win.cc',
59 [ 'OS != "mac" and OS != "ios"', {
62 'mock_apple_keychain.cc',
63 'mock_apple_keychain.h',
66 [ 'OS == "android"', {
68 '../third_party/openssl/openssl.gyp:openssl',
71 ['exclude', 'ec_private_key_nss\.cc$'],
72 ['exclude', 'ec_signature_creator_nss\.cc$'],
73 ['exclude', 'encryptor_nss\.cc$'],
74 ['exclude', 'hmac_nss\.cc$'],
75 ['exclude', 'signature_verifier_nss\.cc$'],
76 ['exclude', 'symmetric_key_nss\.cc$'],
82 '-L/usr/local/lib -lexecinfo',
90 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
97 'mac_security_services_lock.cc',
98 'mac_security_services_lock.h',
101 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
103 '../third_party/nss/nss.gyp:nspr',
104 '../third_party/nss/nss.gyp:nss',
106 'export_dependent_settings': [
107 '../third_party/nss/nss.gyp:nspr',
108 '../third_party/nss/nss.gyp:nss',
118 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
119 'msvs_disabled_warnings': [4267, ],
121 [ 'use_openssl==1', {
122 # TODO(joth): Use a glob to match exclude patterns once the
123 # OpenSSL file set is complete.
125 'ec_private_key_nss.cc',
126 'ec_signature_creator_nss.cc',
131 'openpgp_symmetric_encryption.cc',
132 'rsa_private_key_nss.cc',
133 'secure_hash_default.cc',
134 'signature_creator_nss.cc',
135 'signature_verifier_nss.cc',
136 'symmetric_key_nss.cc',
137 'third_party/nss/chromium-blapi.h',
138 'third_party/nss/chromium-blapit.h',
139 'third_party/nss/chromium-nss.h',
140 'third_party/nss/chromium-sha256.h',
141 'third_party/nss/pk11akey.cc',
142 'third_party/nss/rsawrapr.c',
143 'third_party/nss/secsign.cc',
144 'third_party/nss/sha512.cc',
148 'ec_private_key_openssl.cc',
149 'ec_signature_creator_openssl.cc',
150 'encryptor_openssl.cc',
154 'rsa_private_key_openssl.cc',
155 'secure_hash_openssl.cc',
156 'signature_creator_openssl.cc',
157 'signature_verifier_openssl.cc',
158 'symmetric_key_openssl.cc',
163 # NOTE: all transitive dependencies of HMAC on windows need
164 # to be placed in the source list above.
165 '<@(hmac_win64_related_sources)',
167 'apple_keychain_ios.mm',
168 'apple_keychain_mac.mm',
172 'crypto_module_blocking_password_delegate.h',
177 'curve25519-donna.c',
181 'ec_private_key_nss.cc',
182 'ec_private_key_openssl.cc',
183 'ec_signature_creator.cc',
184 'ec_signature_creator.h',
185 'ec_signature_creator_impl.h',
186 'ec_signature_creator_nss.cc',
187 'ec_signature_creator_openssl.cc',
191 'encryptor_openssl.cc',
196 'mac_security_services_lock.cc',
197 'mac_security_services_lock.h',
198 'mock_apple_keychain.cc',
199 'mock_apple_keychain.h',
200 'mock_apple_keychain_ios.cc',
201 'mock_apple_keychain_mac.cc',
206 'nss_util_internal.h',
207 'openpgp_symmetric_encryption.cc',
208 'openpgp_symmetric_encryption.h',
215 'rsa_private_key.cc',
217 'rsa_private_key_nss.cc',
218 'rsa_private_key_openssl.cc',
219 'scoped_capi_types.h',
220 'scoped_nss_types.h',
222 'secure_hash_default.cc',
223 'secure_hash_openssl.cc',
226 'signature_creator.h',
227 'signature_creator_nss.cc',
228 'signature_creator_openssl.cc',
229 'signature_verifier.h',
230 'signature_verifier_nss.cc',
231 'signature_verifier_openssl.cc',
232 'symmetric_key_nss.cc',
233 'symmetric_key_openssl.cc',
234 'third_party/nss/chromium-blapi.h',
235 'third_party/nss/chromium-blapit.h',
236 'third_party/nss/chromium-nss.h',
237 'third_party/nss/pk11akey.cc',
238 'third_party/nss/rsawrapr.c',
239 'third_party/nss/secsign.cc',
243 'target_name': 'crypto_unittests',
244 'type': 'executable',
246 'curve25519_unittest.cc',
247 'ec_private_key_unittest.cc',
248 'ec_signature_creator_unittest.cc',
249 'encryptor_unittest.cc',
253 'nss_util_unittest.cc',
255 'p224_spake_unittest.cc',
256 'random_unittest.cc',
257 'rsa_private_key_unittest.cc',
258 'rsa_private_key_nss_unittest.cc',
259 'secure_hash_unittest.cc',
261 'signature_creator_unittest.cc',
262 'signature_verifier_unittest.cc',
263 'symmetric_key_unittest.cc',
264 'openpgp_symmetric_encryption_unittest.cc',
268 '../base/base.gyp:base',
269 '../base/base.gyp:run_all_unittests',
270 '../base/base.gyp:test_support_base',
271 '../testing/gmock.gyp:gmock',
272 '../testing/gtest.gyp:gtest',
275 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
277 [ 'linux_use_tcmalloc==1', {
279 '../base/allocator/allocator.gyp:allocator',
285 '../build/linux/system.gyp:ssl',
287 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
289 'rsa_private_key_nss_unittest.cc',
290 'openpgp_symmetric_encryption_unittest.cc',
293 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
295 '../third_party/nss/nss.gyp:nss',
300 '../third_party/nss/nss.gyp:nspr',
304 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
305 'msvs_disabled_warnings': [4267, ],
307 [ 'use_openssl==1', {
309 'nss_util_unittest.cc',
310 'openpgp_symmetric_encryption_unittest.cc',
311 'rsa_private_key_nss_unittest.cc',
318 ['OS == "win" and target_arch=="ia32"', {
321 'target_name': 'crypto_nacl_win64',
322 # We do not want nacl_helper to depend on NSS because this would
323 # require including a 64-bit copy of NSS. Thus, use the native APIs
325 'type': '<(component)',
327 '../base/base.gyp:base_nacl_win64',
328 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
331 '<@(hmac_win64_related_sources)',
334 'CRYPTO_IMPLEMENTATION',
335 '<@(nacl_win64_defines)',
337 'msvs_disabled_warnings': [
342 'msvs_target_platform': 'x64',