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',
132 [ 'use_openssl==1', {
133 # TODO(joth): Use a glob to match exclude patterns once the
134 # OpenSSL file set is complete.
136 'ec_private_key_nss.cc',
137 'ec_signature_creator_nss.cc',
142 'openpgp_symmetric_encryption.cc',
143 'rsa_private_key_nss.cc',
144 'secure_hash_default.cc',
145 'signature_creator_nss.cc',
146 'signature_verifier_nss.cc',
147 'symmetric_key_nss.cc',
148 'third_party/nss/chromium-blapi.h',
149 'third_party/nss/chromium-blapit.h',
150 'third_party/nss/chromium-nss.h',
151 'third_party/nss/chromium-sha256.h',
152 'third_party/nss/pk11akey.cc',
153 'third_party/nss/secsign.cc',
154 'third_party/nss/sha512.cc',
158 'ec_private_key_openssl.cc',
159 'ec_signature_creator_openssl.cc',
160 'encryptor_openssl.cc',
164 'rsa_private_key_openssl.cc',
165 'secure_hash_openssl.cc',
166 'signature_creator_openssl.cc',
167 'signature_verifier_openssl.cc',
168 'symmetric_key_openssl.cc',
173 # NOTE: all transitive dependencies of HMAC on windows need
174 # to be placed in the source list above.
175 '<@(hmac_win64_related_sources)',
177 'apple_keychain_ios.mm',
178 'apple_keychain_mac.mm',
182 'crypto_module_blocking_password_delegate.h',
186 'ec_private_key_nss.cc',
187 'ec_private_key_openssl.cc',
188 'ec_signature_creator.cc',
189 'ec_signature_creator.h',
190 'ec_signature_creator_impl.h',
191 'ec_signature_creator_nss.cc',
192 'ec_signature_creator_openssl.cc',
196 'encryptor_openssl.cc',
199 'mac_security_services_lock.cc',
200 'mac_security_services_lock.h',
201 'mock_apple_keychain.cc',
202 'mock_apple_keychain.h',
203 'mock_apple_keychain_ios.cc',
204 'mock_apple_keychain_mac.cc',
209 'nss_util_internal.h',
210 'openpgp_symmetric_encryption.cc',
211 'openpgp_symmetric_encryption.h',
218 'rsa_private_key.cc',
220 'rsa_private_key_ios.cc',
221 'rsa_private_key_mac.cc',
222 'rsa_private_key_nss.cc',
223 'rsa_private_key_openssl.cc',
224 'rsa_private_key_win.cc',
225 'scoped_capi_types.h',
226 'scoped_nss_types.h',
228 'secure_hash_default.cc',
229 'secure_hash_openssl.cc',
232 'signature_creator.h',
233 'signature_creator_mac.cc',
234 'signature_creator_nss.cc',
235 'signature_creator_openssl.cc',
236 'signature_creator_win.cc',
237 'signature_verifier.h',
238 'signature_verifier_nss.cc',
239 'signature_verifier_openssl.cc',
240 'symmetric_key_nss.cc',
241 'symmetric_key_openssl.cc',
242 'third_party/nss/chromium-blapi.h',
243 'third_party/nss/chromium-blapit.h',
244 'third_party/nss/chromium-nss.h',
245 'third_party/nss/pk11akey.cc',
246 'third_party/nss/secsign.cc',
250 'target_name': 'crypto_unittests',
251 'type': 'executable',
253 # Infrastructure files.
254 'run_all_unittests.cc',
257 'ec_private_key_unittest.cc',
258 'ec_signature_creator_unittest.cc',
259 'encryptor_unittest.cc',
261 'nss_util_unittest.cc',
263 'p224_spake_unittest.cc',
264 'random_unittest.cc',
265 'rsa_private_key_unittest.cc',
266 'rsa_private_key_nss_unittest.cc',
267 'secure_hash_unittest.cc',
269 'signature_creator_unittest.cc',
270 'signature_verifier_unittest.cc',
271 'symmetric_key_unittest.cc',
272 'openpgp_symmetric_encryption_unittest.cc',
276 '../base/base.gyp:base',
277 '../base/base.gyp:test_support_base',
278 '../testing/gmock.gyp:gmock',
279 '../testing/gtest.gyp:gtest',
282 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
284 [ 'linux_use_tcmalloc==1', {
286 '../base/allocator/allocator.gyp:allocator',
292 '../build/linux/system.gyp:ssl',
294 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
296 'rsa_private_key_nss_unittest.cc',
297 'openpgp_symmetric_encryption_unittest.cc',
300 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
302 '../third_party/nss/nss.gyp:nss',
307 # These tests are excluded because they test classes that are not
308 # implemented on iOS.
309 'rsa_private_key_unittest.cc',
310 'signature_creator_unittest.cc',
311 'signature_verifier_unittest.cc',
316 '../third_party/nss/nss.gyp:nspr',
319 [ 'use_openssl==1', {
321 'nss_util_unittest.cc',
322 'openpgp_symmetric_encryption_unittest.cc',
323 'rsa_private_key_nss_unittest.cc',
333 'target_name': 'crypto_nacl_win64',
334 # We do not want nacl_helper to depend on NSS because this would
335 # require including a 64-bit copy of NSS. Thus, use the native APIs
337 'type': '<(component)',
339 '../base/base.gyp:base_nacl_win64',
340 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
343 '<@(hmac_win64_related_sources)',
346 'CRYPTO_IMPLEMENTATION',
347 '<@(nacl_win64_defines)',
349 'msvs_disabled_warnings': [
354 'msvs_target_platform': 'x64',