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.
14 'target_name': 'crypto',
15 'type': '<(component)',
16 'product_name': 'crcrypto', # Avoid colliding with OpenSSL's libcrypto
18 '../base/base.gyp:base',
19 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
22 'CRYPTO_IMPLEMENTATION',
24 'msvs_disabled_warnings': [
28 [ 'os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
30 '../build/linux/system.gyp:ssl',
32 'export_dependent_settings': [
33 '../build/linux/system.gyp:ssl',
37 'sources/': [ ['include', '_chromeos\\.cc$'] ]
41 }, { # os_posix != 1 or OS == "mac" or OS == "ios" or OS == "android"
44 'symmetric_key_win.cc',
47 [ 'OS != "mac" and OS != "ios"', {
50 'mock_apple_keychain.cc',
51 'mock_apple_keychain.h',
54 [ 'OS == "android"', {
56 '../build/android/cpufeatures.gypi',
62 '-L/usr/local/lib -lexecinfo',
70 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
77 'mac_security_services_lock.cc',
78 'mac_security_services_lock.h',
81 [ 'use_openssl == 0 and (OS == "mac" or OS == "ios" or OS == "win")', {
83 '../third_party/nss/nss.gyp:nspr',
84 '../third_party/nss/nss.gyp:nss',
86 'export_dependent_settings': [
87 '../third_party/nss/nss.gyp:nspr',
88 '../third_party/nss/nss.gyp:nss',
98 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
99 'msvs_disabled_warnings': [4267, ],
101 [ 'use_openssl==1', {
103 '../third_party/boringssl/boringssl.gyp:boringssl',
105 # TODO(joth): Use a glob to match exclude patterns once the
106 # OpenSSL file set is complete.
108 'ec_private_key_nss.cc',
109 'ec_signature_creator_nss.cc',
114 'nss_util_internal.h',
115 'rsa_private_key_nss.cc',
116 'secure_hash_default.cc',
117 'signature_creator_nss.cc',
118 'signature_verifier_nss.cc',
119 'symmetric_key_nss.cc',
120 'third_party/nss/chromium-blapi.h',
121 'third_party/nss/chromium-blapit.h',
122 'third_party/nss/chromium-nss.h',
123 'third_party/nss/chromium-prtypes.h',
124 'third_party/nss/chromium-sha256.h',
125 'third_party/nss/pk11akey.cc',
126 'third_party/nss/rsawrapr.c',
127 'third_party/nss/secsign.cc',
128 'third_party/nss/sha512.cc',
132 'ec_private_key_openssl.cc',
133 'ec_signature_creator_openssl.cc',
134 'encryptor_openssl.cc',
136 'openssl_bio_string.cc',
137 'openssl_bio_string.h',
140 'rsa_private_key_openssl.cc',
141 'secure_hash_openssl.cc',
142 'signature_creator_openssl.cc',
143 'signature_verifier_openssl.cc',
144 'symmetric_key_openssl.cc',
149 '<@(crypto_sources)',
153 'target_name': 'crypto_unittests',
154 'type': 'executable',
156 'curve25519_unittest.cc',
157 'ec_private_key_unittest.cc',
158 'ec_signature_creator_unittest.cc',
159 'encryptor_unittest.cc',
163 'nss_util_unittest.cc',
164 'openssl_bio_string_unittest.cc',
166 'p224_spake_unittest.cc',
167 'random_unittest.cc',
168 'rsa_private_key_unittest.cc',
169 'rsa_private_key_nss_unittest.cc',
170 'secure_hash_unittest.cc',
172 'signature_creator_unittest.cc',
173 'signature_verifier_unittest.cc',
174 'symmetric_key_unittest.cc',
178 'crypto_test_support',
179 '../base/base.gyp:base',
180 '../base/base.gyp:run_all_unittests',
181 '../base/base.gyp:test_support_base',
182 '../testing/gmock.gyp:gmock',
183 '../testing/gtest.gyp:gtest',
186 [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
188 [ 'use_allocator!="none"', {
190 '../base/allocator/allocator.gyp:allocator',
196 '../build/linux/system.gyp:ssl',
198 }, { # os_posix != 1 or OS == "mac" or OS == "android" or OS == "ios"
200 'rsa_private_key_nss_unittest.cc',
203 [ 'use_openssl == 0 and (OS == "mac" or OS == "ios" or OS == "win")', {
205 '../third_party/nss/nss.gyp:nspr',
209 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
210 'msvs_disabled_warnings': [4267, ],
212 [ 'use_openssl==1', {
214 '../third_party/boringssl/boringssl.gyp:boringssl',
217 'nss_util_unittest.cc',
218 'rsa_private_key_nss_unittest.cc',
222 'openssl_bio_string_unittest.cc',
229 ['OS == "win" and target_arch=="ia32"', {
232 'target_name': 'crypto_nacl_win64',
233 # We do not want nacl_helper to depend on NSS because this would
234 # require including a 64-bit copy of NSS. Thus, use the native APIs
236 'type': '<(component)',
238 '../base/base.gyp:base_win64',
239 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations_win64',
242 '<@(hmac_win64_related_sources)',
245 'CRYPTO_IMPLEMENTATION',
246 '<@(nacl_win64_defines)',
248 'msvs_disabled_warnings': [
253 'msvs_target_platform': 'x64',
262 'target_name': 'crypto_test_support',
263 'type': 'static_library',
265 '../base/base.gyp:base',
269 'scoped_test_nss_db.cc',
270 'scoped_test_nss_db.h',
271 'scoped_test_nss_chromeos_user.cc',
272 'scoped_test_nss_chromeos_user.h',
273 'scoped_test_system_nss_key_slot.cc',
274 'scoped_test_system_nss_key_slot.h',
279 'scoped_test_nss_db.cc',
280 'scoped_test_nss_db.h',
285 'scoped_test_nss_chromeos_user.cc',
286 'scoped_test_nss_chromeos_user.h',
287 'scoped_test_system_nss_key_slot.cc',
288 'scoped_test_system_nss_key_slot.h',
296 'target_name': 'crypto_test_support',