1 # Copyright 2015 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.
6 # This target is included in both 'net' and 'net_small'.
7 'type': '<(component)',
8 'variables': { 'enable_wexit_time_destructors': 1, },
10 '../base/base.gyp:base',
11 '../base/base.gyp:base_prefs',
12 '../base/third_party/dynamic_annotations/dynamic_annotations.gyp:dynamic_annotations',
13 '../crypto/crypto.gyp:crypto',
14 '../sdch/sdch.gyp:sdch',
15 '../third_party/protobuf/protobuf.gyp:protobuf_lite',
16 '../third_party/zlib/zlib.gyp:zlib',
17 'net_derived_sources',
22 '<@(net_nacl_common_sources)',
23 '<@(net_non_nacl_sources)',
28 'export_dependent_settings': [
29 '../base/base.gyp:base',
34 'base/network_change_notifier_linux.cc',
35 'base/network_change_notifier_linux.h',
36 'base/network_change_notifier_netlink_linux.cc',
37 'base/network_change_notifier_netlink_linux.h',
38 'proxy/proxy_config_service_linux.cc',
39 'proxy/proxy_config_service_linux.h',
49 '/usr/include/kerberosV'
52 ['linux_link_kerberos==1', {
55 '<!@(krb5-config --libs gssapi)',
58 }, { # linux_link_kerberos==0
64 }, { # use_kerberos == 0
66 'http/http_auth_gssapi_posix.cc',
67 'http/http_auth_gssapi_posix.h',
68 'http/http_auth_handler_negotiate.cc',
69 'http/http_auth_handler_negotiate.h',
72 ['posix_avoid_mmap==1', {
76 'direct_dependent_settings': {
82 'disk_cache/blockfile/mapped_file_posix.cc',
86 'disk_cache/blockfile/mapped_file_avoid_mmap_posix.cc',
89 ['disable_file_support!=1', {
90 # TODO(mmenke): Should probably get rid of the dependency on
91 # net_resources in this case (It's used in net_util, to format
92 # directory listings. Also used outside of net/).
93 'sources': ['<@(net_file_support_sources)']
95 ['disable_ftp_support!=1', {
96 'sources': ['<@(net_ftp_support_sources)']
98 ['enable_built_in_dns==1', {
100 'ENABLE_BUILT_IN_DNS',
104 'dns/address_sorter_posix.cc',
105 'dns/address_sorter_posix.h',
113 'cert/ct_log_verifier_nss.cc',
114 'cert/ct_objects_extractor_nss.cc',
115 'cert/jwk_serializer_nss.cc',
116 'cert/scoped_nss_types.h',
117 'cert/sha256_legacy_support_nss_win.cc',
118 'cert/x509_util_nss.cc',
119 'quic/crypto/aead_base_decrypter_nss.cc',
120 'quic/crypto/aead_base_encrypter_nss.cc',
121 'quic/crypto/aes_128_gcm_12_decrypter_nss.cc',
122 'quic/crypto/aes_128_gcm_12_encrypter_nss.cc',
123 'quic/crypto/chacha20_poly1305_decrypter_nss.cc',
124 'quic/crypto/chacha20_poly1305_encrypter_nss.cc',
125 'quic/crypto/channel_id_nss.cc',
126 'quic/crypto/p256_key_exchange_nss.cc',
127 'quic/crypto/proof_source_chromium_nss.cc',
128 'socket/nss_ssl_util.cc',
129 'socket/nss_ssl_util.h',
130 'socket/ssl_client_socket_nss.cc',
131 'socket/ssl_client_socket_nss.h',
132 'socket/ssl_server_socket_nss.cc',
133 'socket/ssl_server_socket_nss.h',
136 '../third_party/boringssl/boringssl.gyp:boringssl',
139 { # else !use_openssl: remove the unneeded files and depend on NSS.
141 'cert/ct_log_verifier_openssl.cc',
142 'cert/ct_objects_extractor_openssl.cc',
143 'cert/jwk_serializer_openssl.cc',
144 'cert/sha256_legacy_support_openssl_win.cc',
145 'cert/x509_util_openssl.cc',
146 'cert/x509_util_openssl.h',
147 'quic/crypto/aead_base_decrypter_openssl.cc',
148 'quic/crypto/aead_base_encrypter_openssl.cc',
149 'quic/crypto/aes_128_gcm_12_decrypter_openssl.cc',
150 'quic/crypto/aes_128_gcm_12_encrypter_openssl.cc',
151 'quic/crypto/chacha20_poly1305_decrypter_openssl.cc',
152 'quic/crypto/chacha20_poly1305_encrypter_openssl.cc',
153 'quic/crypto/channel_id_openssl.cc',
154 'quic/crypto/p256_key_exchange_openssl.cc',
155 'quic/crypto/proof_source_chromium_openssl.cc',
156 'quic/crypto/scoped_evp_aead_ctx.cc',
157 'quic/crypto/scoped_evp_aead_ctx.h',
158 'socket/ssl_client_socket_openssl.cc',
159 'socket/ssl_client_socket_openssl.h',
160 'socket/ssl_server_socket_openssl.cc',
161 'socket/ssl_server_socket_openssl.h',
162 'ssl/client_key_store.cc',
163 'ssl/client_key_store.h',
164 'ssl/openssl_ssl_util.cc',
165 'ssl/openssl_ssl_util.h',
166 'ssl/ssl_client_session_cache_openssl.cc',
167 'ssl/ssl_client_session_cache_openssl.h',
168 'ssl/ssl_platform_key.h',
169 'ssl/ssl_platform_key_nss.cc',
170 'ssl/threaded_ssl_private_key.cc',
171 'ssl/threaded_ssl_private_key.h',
175 [ 'use_nss_certs == 1 or OS == "ios" or use_openssl == 0', {
177 # Pull in the bundled or system NSS as appropriate.
178 [ 'desktop_linux == 1 or chromeos == 1', {
180 '../build/linux/system.gyp:ssl',
184 '../third_party/nss/nss.gyp:nspr',
185 '../third_party/nss/nss.gyp:nss',
186 'third_party/nss/ssl.gyp:libssl',
192 'cert/x509_util_nss.h',
196 [ 'use_openssl_certs == 0', {
198 'base/crypto_module_openssl.cc',
199 'base/keygen_handler_openssl.cc',
200 'base/openssl_private_key_store.h',
201 'base/openssl_private_key_store_android.cc',
202 'base/openssl_private_key_store_memory.cc',
203 'cert/cert_database_openssl.cc',
204 'cert/cert_verify_proc_openssl.cc',
205 'cert/cert_verify_proc_openssl.h',
206 'cert/test_root_certs_openssl.cc',
207 'cert/x509_certificate_openssl.cc',
208 'ssl/openssl_client_key_store.cc',
209 'ssl/openssl_client_key_store.h',
214 '../build/linux/system.gyp:gconf',
215 '../build/linux/system.gyp:gio',
218 [ 'desktop_linux == 1 or chromeos == 1', {
222 'base/network_change_notifier_linux.cc',
223 'base/network_change_notifier_netlink_linux.cc',
224 'proxy/proxy_config_service_linux.cc',
228 '../build/linux/system.gyp:libresolv',
241 [ 'use_nss_certs != 1', {
243 'base/crypto_module_nss.cc',
244 'base/keygen_handler_nss.cc',
245 'cert/cert_database_nss.cc',
246 'cert/cert_verify_proc_nss.cc',
247 'cert/cert_verify_proc_nss.h',
248 'cert/nss_cert_database.cc',
249 'cert/nss_cert_database.h',
250 'cert/nss_cert_database_chromeos.cc',
251 'cert/nss_cert_database_chromeos.h',
252 'cert/nss_profile_filter_chromeos.cc',
253 'cert/nss_profile_filter_chromeos.h',
254 'cert/test_root_certs_nss.cc',
255 'cert/x509_certificate_nss.cc',
256 'cert/x509_util_nss_certs.cc',
257 'cert_net/nss_ocsp.cc',
258 'cert_net/nss_ocsp.h',
259 'ssl/client_cert_store_nss.cc',
260 'ssl/client_cert_store_nss.h',
261 'ssl/client_key_store.cc',
262 'ssl/client_key_store.h',
263 'ssl/ssl_platform_key_nss.cc',
264 'third_party/mozilla_security_manager/nsKeygenHandler.cpp',
265 'third_party/mozilla_security_manager/nsKeygenHandler.h',
266 'third_party/mozilla_security_manager/nsNSSCertificateDB.cpp',
267 'third_party/mozilla_security_manager/nsNSSCertificateDB.h',
268 'third_party/mozilla_security_manager/nsPKCS12Blob.cpp',
269 'third_party/mozilla_security_manager/nsPKCS12Blob.h',
273 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
274 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that
276 [ 'use_nss_certs == 1 and use_openssl == 1', {
278 'third_party/nss/ssl/cmpcert.c',
281 [ 'enable_websockets == 1', {
282 'sources': ['<@(net_websockets_sources)']
284 [ 'enable_mdns != 1', {
288 'dns/mdns_client.cc',
290 'dns/mdns_client_impl.cc',
291 'dns/mdns_client_impl.h',
292 'dns/record_parsed.cc',
293 'dns/record_parsed.h',
294 'dns/record_rdata.cc',
295 'dns/record_rdata.h',
300 'http/http_auth_handler_ntlm_portable.cc',
302 # TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
303 'msvs_disabled_warnings': [4267, ],
304 }, { # else: OS != "win"
306 'base/winsock_init.cc',
307 'base/winsock_init.h',
308 'base/winsock_util.cc',
309 'base/winsock_util.h',
310 'proxy/proxy_resolver_winhttp.cc',
311 'proxy/proxy_resolver_winhttp.h',
318 '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
319 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
320 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
321 '$(SDKROOT)/usr/lib/libresolv.dylib',
328 'disk_cache/blockfile/file_posix.cc',
332 '$(SDKROOT)/System/Library/Frameworks/CFNetwork.framework',
333 '$(SDKROOT)/System/Library/Frameworks/MobileCoreServices.framework',
334 '$(SDKROOT)/System/Library/Frameworks/Security.framework',
335 '$(SDKROOT)/System/Library/Frameworks/SystemConfiguration.framework',
345 [ 'OS == "ios" or OS == "mac"', {
347 '<@(net_base_mac_ios_sources)',
351 ['OS=="android" and _toolset=="target"', {
356 [ 'OS == "android"', {
361 'base/openssl_private_key_store_memory.cc',
362 'cert/cert_database_openssl.cc',
363 'cert/cert_verify_proc_openssl.cc',
364 'cert/test_root_certs_openssl.cc',
365 'http/http_auth_gssapi_posix.cc',
366 'http/http_auth_gssapi_posix.h',
371 'target_conditions': [
372 # These source files are excluded by default platform rules, but they
373 # are needed in specific cases on other platforms. Re-including them can
374 # only be done in target_conditions as it is evaluated after the
376 ['OS == "android"', {
378 ['include', '^base/platform_mime_util_linux\\.cc$'],
379 ['include', '^base/address_tracker_linux\\.cc$'],
380 ['include', '^base/address_tracker_linux\\.h$'],
381 ['include', '^base/network_interfaces_linux\\.cc$'],
382 ['include', '^base/network_interfaces_linux\\.h$'],
387 ['include', '^base/mac/url_conversions\\.h$'],
388 ['include', '^base/mac/url_conversions\\.mm$'],
389 ['include', '^base/network_change_notifier_mac\\.cc$'],
390 ['include', '^base/network_config_watcher_mac\\.cc$'],
391 ['include', '^base/network_interfaces_mac\\.cc$'],
392 ['include', '^base/network_interfaces_mac\\.h$'],
393 ['include', '^base/platform_mime_util_mac\\.mm$'],
394 # The iOS implementation only partially uses NSS and thus does not
395 # defines |use_nss_certs|. In particular the |USE_NSS_CERTS|
396 # preprocessor definition is not used. The following files are needed
398 ['include', '^cert/cert_verify_proc_nss\\.cc$'],
399 ['include', '^cert/cert_verify_proc_nss\\.h$'],
400 ['include', '^cert/test_root_certs_nss\\.cc$'],
401 ['include', '^cert/x509_util_nss_certs\\.cc$'],
402 ['include', '^cert_net/nss_ocsp\\.cc$'],
403 ['include', '^cert_net/nss_ocsp\\.h$'],
404 ['include', '^proxy/proxy_resolver_mac\\.cc$'],
405 ['include', '^proxy/proxy_server_mac\\.cc$'],