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 != "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 == "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 == "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',
160 # NOTE: all transitive dependencies of HMAC on windows need
161 # to be placed in the source list above.
162 '<@(hmac_win64_related_sources)',
166 'crypto_module_blocking_password_delegate.h',
170 'ec_private_key_nss.cc',
171 'ec_private_key_openssl.cc',
172 'ec_signature_creator.cc',
173 'ec_signature_creator.h',
174 'ec_signature_creator_impl.h',
175 'ec_signature_creator_nss.cc',
176 'ec_signature_creator_openssl.cc',
180 'encryptor_openssl.cc',
185 'mac_security_services_lock.cc',
186 'mac_security_services_lock.h',
187 'mock_keychain_mac.cc',
188 'mock_keychain_mac.h',
193 'nss_util_internal.h',
194 'openpgp_symmetric_encryption.cc',
195 'openpgp_symmetric_encryption.h',
200 'rsa_private_key.cc',
202 'rsa_private_key_mac.cc',
203 'rsa_private_key_nss.cc',
204 'rsa_private_key_openssl.cc',
205 'rsa_private_key_win.cc',
206 'scoped_capi_types.h',
207 'scoped_nss_types.h',
209 'secure_hash_default.cc',
210 'secure_hash_openssl.cc',
213 'signature_creator.h',
214 'signature_creator_mac.cc',
215 'signature_creator_nss.cc',
216 'signature_creator_openssl.cc',
217 'signature_creator_win.cc',
218 'signature_verifier.h',
219 'signature_verifier_nss.cc',
220 'signature_verifier_openssl.cc',
221 'symmetric_key_nss.cc',
222 'symmetric_key_openssl.cc',
223 'third_party/nss/chromium-blapi.h',
224 'third_party/nss/chromium-blapit.h',
225 'third_party/nss/chromium-nss.h',
226 'third_party/nss/pk11akey.cc',
227 'third_party/nss/secsign.cc',
231 'target_name': 'crypto_unittests',
232 'type': 'executable',
234 # Infrastructure files.
235 'run_all_unittests.cc',
238 'ec_private_key_unittest.cc',
239 'ec_signature_creator_unittest.cc',
240 'encryptor_unittest.cc',
242 'nss_util_unittest.cc',
244 'p224_spake_unittest.cc',
245 'rsa_private_key_unittest.cc',
246 'rsa_private_key_nss_unittest.cc',
247 'secure_hash_unittest.cc',
249 'signature_creator_unittest.cc',
250 'signature_verifier_unittest.cc',
251 'symmetric_key_unittest.cc',
252 'openpgp_symmetric_encryption_unittest.cc',
256 '../base/base.gyp:base',
257 '../base/base.gyp:test_support_base',
258 '../testing/gmock.gyp:gmock',
259 '../testing/gtest.gyp:gtest',
262 [ 'os_posix == 1 and OS != "mac" and OS != "android"', {
264 [ 'linux_use_tcmalloc==1', {
266 '../base/allocator/allocator.gyp:allocator',
272 '../build/linux/system.gyp:ssl',
274 }, { # os_posix != 1 or OS == "mac" or OS == "android"
276 'rsa_private_key_nss_unittest.cc',
277 'openpgp_symmetric_encryption_unittest.cc',
280 [ 'OS == "mac" or OS == "win"', {
282 '../third_party/nss/nss.gyp:nss',
287 '../third_party/nss/nss.gyp:nspr',
290 [ 'use_openssl==1', {
292 'nss_util_unittest.cc',
293 'openpgp_symmetric_encryption_unittest.cc',
294 'rsa_private_key_nss_unittest.cc',
304 'target_name': 'crypto_nacl_win64',
305 # We do not want nacl_helper to depend on NSS because this would
306 # require including a 64-bit copy of NSS. Thus, use the native APIs
308 'type': '<(component)',
310 '../base/base.gyp:base_nacl_win64',
311 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
314 '<@(hmac_win64_related_sources)',
317 'CRYPTO_IMPLEMENTATION',
318 '<@(nacl_win64_defines)',
320 'msvs_disabled_warnings': [
325 'msvs_target_platform': 'x64',