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 == "android"', {
70 '../third_party/openssl/openssl.gyp:openssl',
73 ['exclude', 'ec_private_key_nss\.cc$'],
74 ['exclude', 'ec_signature_creator_nss\.cc$'],
75 ['exclude', 'encryptor_nss\.cc$'],
76 ['exclude', 'hmac_nss\.cc$'],
77 ['exclude', 'signature_verifier_nss\.cc$'],
78 ['exclude', 'symmetric_key_nss\.cc$'],
84 '-L/usr/local/lib -lexecinfo',
92 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
99 'mac_security_services_lock.cc',
100 'mac_security_services_lock.h',
103 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
105 '../third_party/nss/nss.gyp:nspr',
106 '../third_party/nss/nss.gyp:nss',
108 'export_dependent_settings': [
109 '../third_party/nss/nss.gyp:nspr',
110 '../third_party/nss/nss.gyp:nss',
119 [ 'use_openssl==1', {
120 # TODO(joth): Use a glob to match exclude patterns once the
121 # OpenSSL file set is complete.
123 'ec_private_key_nss.cc',
124 'ec_signature_creator_nss.cc',
129 'openpgp_symmetric_encryption.cc',
130 'rsa_private_key_nss.cc',
131 'secure_hash_default.cc',
132 'signature_creator_nss.cc',
133 'signature_verifier_nss.cc',
134 'symmetric_key_nss.cc',
135 'third_party/nss/chromium-blapi.h',
136 'third_party/nss/chromium-blapit.h',
137 'third_party/nss/chromium-nss.h',
138 'third_party/nss/chromium-sha256.h',
139 'third_party/nss/pk11akey.cc',
140 'third_party/nss/secsign.cc',
141 'third_party/nss/sha512.cc',
145 'ec_private_key_openssl.cc',
146 'ec_signature_creator_openssl.cc',
147 'encryptor_openssl.cc',
151 'rsa_private_key_openssl.cc',
152 'secure_hash_openssl.cc',
153 'signature_creator_openssl.cc',
154 'signature_verifier_openssl.cc',
155 'symmetric_key_openssl.cc',
159 'target_conditions' : [
162 # This class is stubbed out on iOS.
163 'rsa_private_key.cc',
168 # NOTE: all transitive dependencies of HMAC on windows need
169 # to be placed in the source list above.
170 '<@(hmac_win64_related_sources)',
174 'crypto_module_blocking_password_delegate.h',
178 'ec_private_key_nss.cc',
179 'ec_private_key_openssl.cc',
180 'ec_signature_creator.cc',
181 'ec_signature_creator.h',
182 'ec_signature_creator_impl.h',
183 'ec_signature_creator_nss.cc',
184 'ec_signature_creator_openssl.cc',
188 'encryptor_openssl.cc',
193 'mac_security_services_lock.cc',
194 'mac_security_services_lock.h',
195 'mock_keychain_mac.cc',
196 'mock_keychain_mac.h',
201 'nss_util_internal.h',
202 'openpgp_symmetric_encryption.cc',
203 'openpgp_symmetric_encryption.h',
210 'rsa_private_key.cc',
212 'rsa_private_key_ios.cc',
213 'rsa_private_key_mac.cc',
214 'rsa_private_key_nss.cc',
215 'rsa_private_key_openssl.cc',
216 'rsa_private_key_win.cc',
217 'scoped_capi_types.h',
218 'scoped_nss_types.h',
220 'secure_hash_default.cc',
221 'secure_hash_openssl.cc',
224 'signature_creator.h',
225 'signature_creator_mac.cc',
226 'signature_creator_nss.cc',
227 'signature_creator_openssl.cc',
228 'signature_creator_win.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/secsign.cc',
242 'target_name': 'crypto_unittests',
243 'type': 'executable',
245 # Infrastructure files.
246 'run_all_unittests.cc',
249 'ec_private_key_unittest.cc',
250 'ec_signature_creator_unittest.cc',
251 '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:test_support_base',
270 '../testing/gmock.gyp:gmock',
271 '../testing/gtest.gyp:gtest',
274 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
276 [ 'linux_use_tcmalloc==1', {
278 '../base/allocator/allocator.gyp:allocator',
284 '../build/linux/system.gyp:ssl',
286 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
288 'rsa_private_key_nss_unittest.cc',
289 'openpgp_symmetric_encryption_unittest.cc',
292 [ 'OS == "mac" or OS == "ios" or OS == "win"', {
294 '../third_party/nss/nss.gyp:nss',
299 # These tests are excluded because they test classes that are not
300 # implemented on iOS.
301 'rsa_private_key_unittest.cc',
302 'signature_creator_unittest.cc',
303 'signature_verifier_unittest.cc',
308 '../third_party/nss/nss.gyp:nspr',
311 [ 'use_openssl==1', {
313 'nss_util_unittest.cc',
314 'openpgp_symmetric_encryption_unittest.cc',
315 'rsa_private_key_nss_unittest.cc',
325 'target_name': 'crypto_nacl_win64',
326 # We do not want nacl_helper to depend on NSS because this would
327 # require including a 64-bit copy of NSS. Thus, use the native APIs
329 'type': '<(component)',
331 '../base/base.gyp:base_nacl_win64',
332 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
335 '<@(hmac_win64_related_sources)',
338 'CRYPTO_IMPLEMENTATION',
339 '<@(nacl_win64_defines)',
341 'msvs_disabled_warnings': [
346 'msvs_target_platform': 'x64',