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$'],
79 '../build/android/cpufeatures.gypi',
85 '-L/usr/local/lib -lexecinfo',
93 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
100 'mac_security_services_lock.cc',
101 'mac_security_services_lock.h',
104 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
106 '../third_party/nss/nss.gyp:nspr',
107 '../third_party/nss/nss.gyp:nss',
109 'export_dependent_settings': [
110 '../third_party/nss/nss.gyp:nspr',
111 '../third_party/nss/nss.gyp:nss',
121 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
122 'msvs_disabled_warnings': [4267, ],
124 [ 'use_openssl==1', {
125 # TODO(joth): Use a glob to match exclude patterns once the
126 # OpenSSL file set is complete.
128 'ec_private_key_nss.cc',
129 'ec_signature_creator_nss.cc',
134 'openpgp_symmetric_encryption.cc',
135 'rsa_private_key_nss.cc',
136 'secure_hash_default.cc',
137 'signature_creator_nss.cc',
138 'signature_verifier_nss.cc',
139 'symmetric_key_nss.cc',
140 'third_party/nss/chromium-blapi.h',
141 'third_party/nss/chromium-blapit.h',
142 'third_party/nss/chromium-nss.h',
143 'third_party/nss/chromium-sha256.h',
144 'third_party/nss/pk11akey.cc',
145 'third_party/nss/rsawrapr.c',
146 'third_party/nss/secsign.cc',
147 'third_party/nss/sha512.cc',
151 'ec_private_key_openssl.cc',
152 'ec_signature_creator_openssl.cc',
153 'encryptor_openssl.cc',
157 'rsa_private_key_openssl.cc',
158 'secure_hash_openssl.cc',
159 'signature_creator_openssl.cc',
160 'signature_verifier_openssl.cc',
161 'symmetric_key_openssl.cc',
166 # NOTE: all transitive dependencies of HMAC on windows need
167 # to be placed in the source list above.
168 '<@(hmac_win64_related_sources)',
170 'apple_keychain_ios.mm',
171 'apple_keychain_mac.mm',
179 'curve25519-donna.c',
183 'ec_private_key_nss.cc',
184 'ec_private_key_openssl.cc',
185 'ec_signature_creator.cc',
186 'ec_signature_creator.h',
187 'ec_signature_creator_impl.h',
188 'ec_signature_creator_nss.cc',
189 'ec_signature_creator_openssl.cc',
193 'encryptor_openssl.cc',
198 'mac_security_services_lock.cc',
199 'mac_security_services_lock.h',
200 'mock_apple_keychain.cc',
201 'mock_apple_keychain.h',
202 'mock_apple_keychain_ios.cc',
203 'mock_apple_keychain_mac.cc',
206 'nss_crypto_module_delegate.h',
209 'nss_util_internal.h',
210 'openpgp_symmetric_encryption.cc',
211 'openpgp_symmetric_encryption.h',
218 'rsa_private_key.cc',
220 'rsa_private_key_nss.cc',
221 'rsa_private_key_openssl.cc',
222 'scoped_capi_types.h',
223 'scoped_nss_types.h',
225 'secure_hash_default.cc',
226 'secure_hash_openssl.cc',
229 'signature_creator.h',
230 'signature_creator_nss.cc',
231 'signature_creator_openssl.cc',
232 'signature_verifier.h',
233 'signature_verifier_nss.cc',
234 'signature_verifier_openssl.cc',
235 'symmetric_key_nss.cc',
236 'symmetric_key_openssl.cc',
237 'third_party/nss/chromium-blapi.h',
238 'third_party/nss/chromium-blapit.h',
239 'third_party/nss/chromium-nss.h',
240 'third_party/nss/pk11akey.cc',
241 'third_party/nss/rsawrapr.c',
242 'third_party/nss/secsign.cc',
246 'target_name': 'crypto_unittests',
247 'type': 'executable',
249 'curve25519_unittest.cc',
250 'ec_private_key_unittest.cc',
251 'ec_signature_creator_unittest.cc',
252 'encryptor_unittest.cc',
256 'nss_util_unittest.cc',
258 'p224_spake_unittest.cc',
259 'random_unittest.cc',
260 'rsa_private_key_unittest.cc',
261 'rsa_private_key_nss_unittest.cc',
262 'secure_hash_unittest.cc',
264 'signature_creator_unittest.cc',
265 'signature_verifier_unittest.cc',
266 'symmetric_key_unittest.cc',
267 'openpgp_symmetric_encryption_unittest.cc',
271 '../base/base.gyp:base',
272 '../base/base.gyp:run_all_unittests',
273 '../base/base.gyp:test_support_base',
274 '../testing/gmock.gyp:gmock',
275 '../testing/gtest.gyp:gtest',
278 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
280 [ 'linux_use_tcmalloc==1', {
282 '../base/allocator/allocator.gyp:allocator',
288 '../build/linux/system.gyp:ssl',
290 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
292 'rsa_private_key_nss_unittest.cc',
293 'openpgp_symmetric_encryption_unittest.cc',
296 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
298 '../third_party/nss/nss.gyp:nss',
303 '../third_party/nss/nss.gyp:nspr',
307 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
308 'msvs_disabled_warnings': [4267, ],
310 [ 'use_openssl==1', {
312 'nss_util_unittest.cc',
313 'openpgp_symmetric_encryption_unittest.cc',
314 'rsa_private_key_nss_unittest.cc',
321 ['OS == "win" and target_arch=="ia32"', {
324 'target_name': 'crypto_nacl_win64',
325 # We do not want nacl_helper to depend on NSS because this would
326 # require including a 64-bit copy of NSS. Thus, use the native APIs
328 'type': '<(component)',
330 '../base/base.gyp:base_win64',
331 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
334 '<@(hmac_win64_related_sources)',
337 'CRYPTO_IMPLEMENTATION',
338 '<@(nacl_win64_defines)',
340 'msvs_disabled_warnings': [
345 'msvs_target_platform': 'x64',