Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(355)

Side by Side Diff: net/BUILD.gn

Issue 881213004: Support building BoringSSL with NSS certificates. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « crypto/rsa_private_key_unittest.cc ('k') | net/cert/ev_root_ca_metadata_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 import("//build/config/crypto.gni") 5 import("//build/config/crypto.gni")
6 import("//build/config/features.gni") 6 import("//build/config/features.gni")
7 import("//build/config/ui.gni") 7 import("//build/config/ui.gni")
8 import("//build/module_args/v8.gni") 8 import("//build/module_args/v8.gni")
9 import("//url/config.gni") 9 import("//url/config.gni")
10 import("//testing/test.gni") 10 import("//testing/test.gni")
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 } 187 }
188 188
189 if (use_openssl) { 189 if (use_openssl) {
190 sources -= [ 190 sources -= [
191 "base/nss_memio.c", 191 "base/nss_memio.c",
192 "base/nss_memio.h", 192 "base/nss_memio.h",
193 "cert/ct_log_verifier_nss.cc", 193 "cert/ct_log_verifier_nss.cc",
194 "cert/ct_objects_extractor_nss.cc", 194 "cert/ct_objects_extractor_nss.cc",
195 "cert/jwk_serializer_nss.cc", 195 "cert/jwk_serializer_nss.cc",
196 "cert/scoped_nss_types.h", 196 "cert/scoped_nss_types.h",
197 "cert/test_root_certs_nss.cc",
198 "cert/x509_util_nss.cc", 197 "cert/x509_util_nss.cc",
199 "cert/x509_util_nss.h",
200 "cert_net/nss_ocsp.cc",
201 "cert_net/nss_ocsp.h",
202 "quic/crypto/aead_base_decrypter_nss.cc", 198 "quic/crypto/aead_base_decrypter_nss.cc",
203 "quic/crypto/aead_base_encrypter_nss.cc", 199 "quic/crypto/aead_base_encrypter_nss.cc",
204 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc", 200 "quic/crypto/aes_128_gcm_12_decrypter_nss.cc",
205 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc", 201 "quic/crypto/aes_128_gcm_12_encrypter_nss.cc",
206 "quic/crypto/chacha20_poly1305_decrypter_nss.cc", 202 "quic/crypto/chacha20_poly1305_decrypter_nss.cc",
207 "quic/crypto/chacha20_poly1305_encrypter_nss.cc", 203 "quic/crypto/chacha20_poly1305_encrypter_nss.cc",
208 "quic/crypto/channel_id_nss.cc", 204 "quic/crypto/channel_id_nss.cc",
209 "quic/crypto/p256_key_exchange_nss.cc", 205 "quic/crypto/p256_key_exchange_nss.cc",
210 "socket/nss_ssl_util.cc", 206 "socket/nss_ssl_util.cc",
211 "socket/nss_ssl_util.h", 207 "socket/nss_ssl_util.h",
212 "socket/ssl_client_socket_nss.cc", 208 "socket/ssl_client_socket_nss.cc",
213 "socket/ssl_client_socket_nss.h", 209 "socket/ssl_client_socket_nss.h",
214 "socket/ssl_server_socket_nss.cc", 210 "socket/ssl_server_socket_nss.cc",
215 "socket/ssl_server_socket_nss.h", 211 "socket/ssl_server_socket_nss.h",
216 ] 212 ]
217 if (is_chromeos) {
218 sources -= [
219 "cert/nss_cert_database_chromeos.cc",
220 "cert/nss_cert_database_chromeos.h",
221 "cert/nss_profile_filter_chromeos.cc",
222 "cert/nss_profile_filter_chromeos.h",
223 ]
224 }
225 if (is_linux) {
226 # These are always removed for non-Linux cases below.
227 sources -= [
228 "base/crypto_module_nss.cc",
229 "base/keygen_handler_nss.cc",
230 "cert/cert_database_nss.cc",
231 "cert/nss_cert_database.cc",
232 "cert/nss_cert_database.h",
233 "cert/x509_certificate_nss.cc",
234 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
235 "third_party/mozilla_security_manager/nsKeygenHandler.h",
236 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
237 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
238 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
239 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
240 ]
241 }
242 if (is_ios) { 213 if (is_ios) {
243 # Always removed for !ios below. 214 # Always removed for !ios below.
244 sources -= [ 215 sources -= [
245 "cert/cert_verify_proc_nss.cc", 216 "cert/cert_verify_proc_nss.cc",
246 "cert/cert_verify_proc_nss.h", 217 "cert/cert_verify_proc_nss.h",
247 ] 218 ]
248 } 219 }
249 if (is_win) { 220 if (is_win) {
250 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ] 221 sources -= [ "cert/sha256_legacy_support_nss_win.cc" ]
251 } 222 }
223 if (!use_nss_certs && !is_ios) {
224 sources -= [ "cert/x509_util_nss.h" ]
225 }
252 } else { 226 } else {
253 sources -= [ 227 sources -= [
254 "base/crypto_module_openssl.cc",
255 "cert/ct_log_verifier_openssl.cc", 228 "cert/ct_log_verifier_openssl.cc",
256 "cert/ct_objects_extractor_openssl.cc", 229 "cert/ct_objects_extractor_openssl.cc",
257 "cert/jwk_serializer_openssl.cc", 230 "cert/jwk_serializer_openssl.cc",
258 "cert/x509_util_openssl.cc", 231 "cert/x509_util_openssl.cc",
259 "cert/x509_util_openssl.h", 232 "cert/x509_util_openssl.h",
260 "quic/crypto/aead_base_decrypter_openssl.cc", 233 "quic/crypto/aead_base_decrypter_openssl.cc",
261 "quic/crypto/aead_base_encrypter_openssl.cc", 234 "quic/crypto/aead_base_encrypter_openssl.cc",
262 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc", 235 "quic/crypto/aes_128_gcm_12_decrypter_openssl.cc",
263 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc", 236 "quic/crypto/aes_128_gcm_12_encrypter_openssl.cc",
264 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc", 237 "quic/crypto/chacha20_poly1305_decrypter_openssl.cc",
265 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc", 238 "quic/crypto/chacha20_poly1305_encrypter_openssl.cc",
266 "quic/crypto/channel_id_openssl.cc", 239 "quic/crypto/channel_id_openssl.cc",
267 "quic/crypto/p256_key_exchange_openssl.cc", 240 "quic/crypto/p256_key_exchange_openssl.cc",
268 "quic/crypto/scoped_evp_aead_ctx.cc", 241 "quic/crypto/scoped_evp_aead_ctx.cc",
269 "quic/crypto/scoped_evp_aead_ctx.h", 242 "quic/crypto/scoped_evp_aead_ctx.h",
270 "socket/ssl_client_socket_openssl.cc", 243 "socket/ssl_client_socket_openssl.cc",
271 "socket/ssl_client_socket_openssl.h", 244 "socket/ssl_client_socket_openssl.h",
272 "socket/ssl_server_socket_openssl.cc", 245 "socket/ssl_server_socket_openssl.cc",
273 "socket/ssl_server_socket_openssl.h", 246 "socket/ssl_server_socket_openssl.h",
274 "ssl/openssl_platform_key.h", 247 "ssl/openssl_platform_key.h",
248 "ssl/openssl_platform_key_nss.cc",
275 "ssl/openssl_ssl_util.cc", 249 "ssl/openssl_ssl_util.cc",
276 "ssl/openssl_ssl_util.h", 250 "ssl/openssl_ssl_util.h",
277 "ssl/ssl_client_session_cache_openssl.cc", 251 "ssl/ssl_client_session_cache_openssl.cc",
278 "ssl/ssl_client_session_cache_openssl.h", 252 "ssl/ssl_client_session_cache_openssl.h",
279 ] 253 ]
280 if (is_mac) { 254 if (is_mac) {
281 sources -= [ "ssl/openssl_platform_key_mac.cc" ] 255 sources -= [ "ssl/openssl_platform_key_mac.cc" ]
282 } 256 }
283 if (is_win) { 257 if (is_win) {
284 sources -= [ 258 sources -= [
285 "cert/sha256_legacy_support_openssl_win.cc", 259 "cert/sha256_legacy_support_openssl_win.cc",
286 "ssl/openssl_platform_key_win.cc", 260 "ssl/openssl_platform_key_win.cc",
287 ] 261 ]
288 } 262 }
289 } 263 }
290 264
291 if (!use_openssl_certs) { 265 if (!use_openssl_certs) {
292 sources -= [ 266 sources -= [
267 "base/crypto_module_openssl.cc",
293 "base/keygen_handler_openssl.cc", 268 "base/keygen_handler_openssl.cc",
294 "base/openssl_private_key_store.h", 269 "base/openssl_private_key_store.h",
295 "base/openssl_private_key_store_memory.cc", 270 "base/openssl_private_key_store_memory.cc",
296 "cert/cert_database_openssl.cc", 271 "cert/cert_database_openssl.cc",
297 "cert/cert_verify_proc_openssl.cc", 272 "cert/cert_verify_proc_openssl.cc",
298 "cert/cert_verify_proc_openssl.h", 273 "cert/cert_verify_proc_openssl.h",
299 "cert/test_root_certs_openssl.cc", 274 "cert/test_root_certs_openssl.cc",
300 "cert/x509_certificate_openssl.cc", 275 "cert/x509_certificate_openssl.cc",
301 "ssl/openssl_client_key_store.cc", 276 "ssl/openssl_client_key_store.cc",
302 "ssl/openssl_client_key_store.h", 277 "ssl/openssl_client_key_store.h",
(...skipping 11 matching lines...) Expand all
314 ] 289 ]
315 } 290 }
316 291
317 if (use_glib && !is_chromeos) { 292 if (use_glib && !is_chromeos) {
318 configs += [ "//build/config/linux:gconf" ] 293 configs += [ "//build/config/linux:gconf" ]
319 deps += [ "//build/config/linux:gio" ] 294 deps += [ "//build/config/linux:gio" ]
320 } 295 }
321 296
322 if (is_linux) { 297 if (is_linux) {
323 configs += [ "//build/config/linux:libresolv" ] 298 configs += [ "//build/config/linux:libresolv" ]
324 } else { 299 }
300
301 if (!use_nss_certs) {
325 sources -= [ 302 sources -= [
326 "base/crypto_module_nss.cc", 303 "base/crypto_module_nss.cc",
327 "base/keygen_handler_nss.cc", 304 "base/keygen_handler_nss.cc",
328 "cert/cert_database_nss.cc", 305 "cert/cert_database_nss.cc",
329 "cert/nss_cert_database.cc", 306 "cert/nss_cert_database.cc",
330 "cert/nss_cert_database.h", 307 "cert/nss_cert_database.h",
331 "cert/x509_certificate_nss.cc", 308 "cert/x509_certificate_nss.cc",
309 "ssl/client_cert_store_nss.cc",
310 "ssl/client_cert_store_nss.h",
332 "third_party/mozilla_security_manager/nsKeygenHandler.cpp", 311 "third_party/mozilla_security_manager/nsKeygenHandler.cpp",
333 "third_party/mozilla_security_manager/nsKeygenHandler.h", 312 "third_party/mozilla_security_manager/nsKeygenHandler.h",
334 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp", 313 "third_party/mozilla_security_manager/nsNSSCertificateDB.cpp",
335 "third_party/mozilla_security_manager/nsNSSCertificateDB.h", 314 "third_party/mozilla_security_manager/nsNSSCertificateDB.h",
336 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp", 315 "third_party/mozilla_security_manager/nsPKCS12Blob.cpp",
337 "third_party/mozilla_security_manager/nsPKCS12Blob.h", 316 "third_party/mozilla_security_manager/nsPKCS12Blob.h",
338 ] 317 ]
339
340 if (!is_ios && !use_openssl) {
341 # These files are part of the partial implementation of NSS on iOS so
342 # keep them in that case.
343 sources -= [
344 "cert/test_root_certs_nss.cc",
345 "cert_net/nss_ocsp.cc",
346 "cert_net/nss_ocsp.h",
347 ]
348 }
349 }
350
351 if (!use_nss_certs) {
352 sources -= [
353 "ssl/client_cert_store_nss.cc",
354 "ssl/client_cert_store_nss.h",
355 ]
356 if (!is_ios) { 318 if (!is_ios) {
357 # These files are part of the partial implementation of NSS on iOS so 319 # These files are part of the partial implementation of NSS on iOS so
358 # keep them in that case (even though use_nss_certs is not set). 320 # keep them in that case (even though use_nss_certs is not set).
359 sources -= [ 321 sources -= [
360 "cert/cert_verify_proc_nss.cc", 322 "cert/cert_verify_proc_nss.cc",
361 "cert/cert_verify_proc_nss.h", 323 "cert/cert_verify_proc_nss.h",
324 "cert/test_root_certs_nss.cc",
325 "cert/x509_util_nss_certs.cc",
326 "cert_net/nss_ocsp.cc",
327 "cert_net/nss_ocsp.h",
362 ] 328 ]
363 } 329 }
364 if (is_chromeos) { 330 if (is_chromeos) {
365 # These were already removed on non-ChromeOS. 331 # These were already removed on non-ChromeOS.
366 sources -= [ 332 sources -= [
333 "cert/nss_cert_database_chromeos.cc",
334 "cert/nss_cert_database_chromeos.h",
335 "cert/nss_profile_filter_chromeos.cc",
336 "cert/nss_profile_filter_chromeos.h",
367 "ssl/client_cert_store_chromeos.cc", 337 "ssl/client_cert_store_chromeos.cc",
368 "ssl/client_cert_store_chromeos.h", 338 "ssl/client_cert_store_chromeos.h",
369 ] 339 ]
370 } 340 }
341 if (use_openssl) {
342 sources -= [ "ssl/openssl_platform_key_nss.cc" ]
343 }
344 } else if (use_openssl) {
345 # client_cert_store_nss.c requires NSS_CmpCertChainWCANames from NSS's
346 # libssl, but our bundled copy is not built in OpenSSL ports. Pull that file
347 # in directly.
348 sources += [ "third_party/nss/ssl/cmpcert.c" ]
371 } 349 }
372 350
373 if (!enable_websockets) { 351 if (!enable_websockets) {
374 sources -= [ 352 sources -= [
375 "websockets/websocket_basic_handshake_stream.cc", 353 "websockets/websocket_basic_handshake_stream.cc",
376 "websockets/websocket_basic_handshake_stream.h", 354 "websockets/websocket_basic_handshake_stream.h",
377 "websockets/websocket_basic_stream.cc", 355 "websockets/websocket_basic_stream.cc",
378 "websockets/websocket_basic_stream.h", 356 "websockets/websocket_basic_stream.h",
379 "websockets/websocket_channel.cc", 357 "websockets/websocket_channel.cc",
380 "websockets/websocket_channel.h", 358 "websockets/websocket_channel.h",
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
453 if (is_mac) { 431 if (is_mac) {
454 libs = [ 432 libs = [
455 "Foundation.framework", 433 "Foundation.framework",
456 "Security.framework", 434 "Security.framework",
457 "SystemConfiguration.framework", 435 "SystemConfiguration.framework",
458 "resolv", 436 "resolv",
459 ] 437 ]
460 } 438 }
461 439
462 if (is_ios) { 440 if (is_ios) {
463 # Add back some sources that were otherwise filtered out. iOS additionally 441 # Add back some sources that were otherwise filtered out. iOS needs some Mac
464 # doesn't set USE_NSS_CERTS but needs some of the files. 442 # files.
465 set_sources_assignment_filter([]) 443 set_sources_assignment_filter([])
466 sources += [ 444 sources += [
467 "base/net_util_mac.cc", 445 "base/net_util_mac.cc",
468 "base/net_util_mac.h", 446 "base/net_util_mac.h",
469 "base/network_change_notifier_mac.cc", 447 "base/network_change_notifier_mac.cc",
470 "base/network_config_watcher_mac.cc", 448 "base/network_config_watcher_mac.cc",
471 "base/platform_mime_util_mac.mm", 449 "base/platform_mime_util_mac.mm",
472 "cert/cert_verify_proc_nss.cc",
473 "cert/cert_verify_proc_nss.h",
474 "cert/test_root_certs_nss.cc",
475 "cert/x509_util_nss.cc",
476 "cert/x509_util_nss.h",
477 "cert_net/nss_ocsp.cc",
478 "cert_net/nss_ocsp.h",
479 "proxy/proxy_resolver_mac.cc", 450 "proxy/proxy_resolver_mac.cc",
480 "proxy/proxy_server_mac.cc", 451 "proxy/proxy_server_mac.cc",
481 ] 452 ]
482 set_sources_assignment_filter(sources_assignment_filter) 453 set_sources_assignment_filter(sources_assignment_filter)
483 454
484 sources -= [ "disk_cache/blockfile/file_posix.cc" ] 455 sources -= [ "disk_cache/blockfile/file_posix.cc" ]
485 libs = [ 456 libs = [
486 "CFNetwork.framework", 457 "CFNetwork.framework",
487 "MobileCoreServices.framework", 458 "MobileCoreServices.framework",
488 "Security.framework", 459 "Security.framework",
(...skipping 896 matching lines...) Expand 10 before | Expand all | Expand 10 after
1385 ":net_javatests", # FIXME(brettw) 1356 ":net_javatests", # FIXME(brettw)
1386 ":net_test_jni_headers", 1357 ":net_test_jni_headers",
1387 ] 1358 ]
1388 } 1359 }
1389 1360
1390 if (v8_use_external_startup_data) { 1361 if (v8_use_external_startup_data) {
1391 deps += [ "//gin" ] 1362 deps += [ "//gin" ]
1392 } 1363 }
1393 1364
1394 if (!use_nss_certs) { 1365 if (!use_nss_certs) {
1395 sources -= [ "ssl/client_cert_store_nss_unittest.cc" ] 1366 sources -= [
1367 "cert/nss_cert_database_unittest.cc",
1368 "ssl/client_cert_store_nss_unittest.cc",
1369 ]
1396 if (is_chromeos) { # Already removed for all non-ChromeOS builds. 1370 if (is_chromeos) { # Already removed for all non-ChromeOS builds.
1397 sources -= [ "ssl/client_cert_store_chromeos_unittest.cc" ] 1371 sources -= [
1372 "cert/nss_cert_database_chromeos_unittest.cc",
1373 "cert/nss_profile_filter_chromeos_unittest.cc",
1374 "ssl/client_cert_store_chromeos_unittest.cc",
1375 ]
1398 } 1376 }
1399 } 1377 }
1400 1378
1401 if (use_openssl) { 1379 if (use_openssl) {
1402 # When building for OpenSSL, we need to exclude NSS specific tests 1380 # When building for OpenSSL, we need to exclude NSS specific tests
1403 # or functionality not supported by OpenSSL yet. 1381 # or functionality not supported by OpenSSL yet.
1404 # TODO(bulach): Add equivalent tests when the underlying 1382 # TODO(bulach): Add equivalent tests when the underlying
1405 # functionality is ported to OpenSSL. 1383 # functionality is ported to OpenSSL.
1406 sources -= [ 1384 sources -= [
1407 "cert/nss_cert_database_unittest.cc",
1408 "cert/x509_util_nss_unittest.cc", 1385 "cert/x509_util_nss_unittest.cc",
1409 "quic/test_tools/crypto_test_utils_nss.cc", 1386 "quic/test_tools/crypto_test_utils_nss.cc",
1410 ] 1387 ]
1411 if (is_chromeos) {
1412 # These were already removed in the non-ChromeOS case.
1413 sources -= [
1414 "cert/nss_cert_database_chromeos_unittest.cc",
1415 "cert/nss_profile_filter_chromeos_unittest.cc",
1416 ]
1417 }
1418 } else { 1388 } else {
1419 sources -= [ 1389 sources -= [
1420 "cert/x509_util_openssl_unittest.cc", 1390 "cert/x509_util_openssl_unittest.cc",
1421 "quic/test_tools/crypto_test_utils_openssl.cc", 1391 "quic/test_tools/crypto_test_utils_openssl.cc",
1422 "socket/ssl_client_socket_openssl_unittest.cc", 1392 "socket/ssl_client_socket_openssl_unittest.cc",
1423 "ssl/ssl_client_session_cache_openssl_unittest.cc", 1393 "ssl/ssl_client_session_cache_openssl_unittest.cc",
1424 ] 1394 ]
1425 if (!is_desktop_linux && !is_chromeos) {
1426 sources -= [ "cert/nss_cert_database_unittest.cc" ]
1427 }
1428 } 1395 }
1429 1396
1430 if (use_kerberos) { 1397 if (use_kerberos) {
1431 defines += [ "USE_KERBEROS" ] 1398 defines += [ "USE_KERBEROS" ]
1432 } else { 1399 } else {
1433 sources -= [ 1400 sources -= [
1434 "http/http_auth_gssapi_posix_unittest.cc", 1401 "http/http_auth_gssapi_posix_unittest.cc",
1435 "http/http_auth_handler_negotiate_unittest.cc", 1402 "http/http_auth_handler_negotiate_unittest.cc",
1436 "http/mock_gssapi_library_posix.cc", 1403 "http/mock_gssapi_library_posix.cc",
1437 "http/mock_gssapi_library_posix.h", 1404 "http/mock_gssapi_library_posix.h",
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
1651 } else { 1618 } else {
1652 sources -= [ "proxy/proxy_resolver_perftest.cc" ] 1619 sources -= [ "proxy/proxy_resolver_perftest.cc" ]
1653 } 1620 }
1654 1621
1655 if (is_win && icu_use_data_file) { 1622 if (is_win && icu_use_data_file) {
1656 # This is needed to trigger the dll copy step on windows. 1623 # This is needed to trigger the dll copy step on windows.
1657 # TODO(mark): Specifying this here shouldn't be necessary. 1624 # TODO(mark): Specifying this here shouldn't be necessary.
1658 deps += [ "//third_party/icu:icudata" ] 1625 deps += [ "//third_party/icu:icudata" ]
1659 } 1626 }
1660 } 1627 }
OLDNEW
« no previous file with comments | « crypto/rsa_private_key_unittest.cc ('k') | net/cert/ev_root_ca_metadata_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698