Commit 15d69d48 authored by davidben's avatar davidben Committed by Commit bot

Only depend on NSS in one place.

Control with use_openssl, not with per-platform special-cases.

BUG=416683

Review URL: https://codereview.chromium.org/569683003

Cr-Commit-Position: refs/heads/master@{#297211}
parent b34c55a6
...@@ -458,10 +458,6 @@ component("net") { ...@@ -458,10 +458,6 @@ component("net") {
"udp/udp_socket_libevent.cc", "udp/udp_socket_libevent.cc",
"udp/udp_socket_libevent.h", "udp/udp_socket_libevent.h",
] ]
deps += [
"//third_party/nss:nspr",
"//third_party/nss",
]
} else { # !is_win } else { # !is_win
sources -= [ sources -= [
"base/winsock_init.cc", "base/winsock_init.cc",
...@@ -474,12 +470,6 @@ component("net") { ...@@ -474,12 +470,6 @@ component("net") {
} }
if (is_mac) { if (is_mac) {
if (!use_openssl) {
deps += [
"//third_party/nss:nspr",
"//third_party/nss",
]
}
libs = [ libs = [
"Foundation.framework", "Foundation.framework",
"Security.framework", "Security.framework",
...@@ -509,9 +499,6 @@ component("net") { ...@@ -509,9 +499,6 @@ component("net") {
set_sources_assignment_filter(sources_assignment_filter) set_sources_assignment_filter(sources_assignment_filter)
sources -= [ "disk_cache/blockfile/file_posix.cc" ] sources -= [ "disk_cache/blockfile/file_posix.cc" ]
deps += [
"//third_party/nss",
]
libs = [ libs = [
"CFNetwork.framework", "CFNetwork.framework",
"MobileCoreServices.framework", "MobileCoreServices.framework",
...@@ -708,8 +695,8 @@ source_set("test_support") { ...@@ -708,8 +695,8 @@ source_set("test_support") {
"//url", "//url",
] ]
if (is_ios) { if (!use_openssl && (use_nss_certs || is_ios)) {
public_deps += [ "//third_party/nss" ] public_deps += ["//crypto:platform" ]
} }
if (!is_android) { if (!is_android) {
...@@ -732,9 +719,7 @@ source_set("test_support") { ...@@ -732,9 +719,7 @@ source_set("test_support") {
] ]
} }
if (use_nss_certs) { if (!use_nss_certs) {
public_deps += ["//crypto:platform" ]
} else {
sources -= [ sources -= [
"test/cert_test_util_nss.cc", "test/cert_test_util_nss.cc",
] ]
......
...@@ -252,7 +252,7 @@ ...@@ -252,7 +252,7 @@
'../third_party/boringssl/boringssl.gyp:boringssl', '../third_party/boringssl/boringssl.gyp:boringssl',
], ],
}, },
{ # else !use_openssl: remove the unneeded files { # else !use_openssl: remove the unneeded files and depend on NSS.
'sources!': [ 'sources!': [
'base/crypto_module_openssl.cc', 'base/crypto_module_openssl.cc',
'cert/ct_log_verifier_openssl.cc', 'cert/ct_log_verifier_openssl.cc',
...@@ -283,6 +283,22 @@ ...@@ -283,6 +283,22 @@
'ssl/openssl_ssl_util.cc', 'ssl/openssl_ssl_util.cc',
'ssl/openssl_ssl_util.h', 'ssl/openssl_ssl_util.h',
], ],
'conditions': [
# Pull in the bundled or system NSS as appropriate.
[ 'desktop_linux == 1 or chromeos == 1', {
'dependencies': [
'../build/linux/system.gyp:ssl',
],
}, {
'dependencies': [
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
}]
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
}, },
], ],
[ 'use_openssl_certs == 0', { [ 'use_openssl_certs == 0', {
...@@ -308,12 +324,6 @@ ...@@ -308,12 +324,6 @@
}], }],
[ 'desktop_linux == 1 or chromeos == 1', { [ 'desktop_linux == 1 or chromeos == 1', {
'conditions': [ 'conditions': [
['use_openssl == 0', {
# use NSS
'dependencies': [
'../build/linux/system.gyp:ssl',
],
}],
['os_bsd==1', { ['os_bsd==1', {
'sources!': [ 'sources!': [
'base/network_change_notifier_linux.cc', 'base/network_change_notifier_linux.cc',
...@@ -398,13 +408,6 @@ ...@@ -398,13 +408,6 @@
'udp/udp_socket_libevent.cc', 'udp/udp_socket_libevent.cc',
'udp/udp_socket_libevent.h', 'udp/udp_socket_libevent.h',
], ],
'dependencies': [
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
}, { # else: OS != "win" }, { # else: OS != "win"
'sources!': [ 'sources!': [
'base/winsock_init.cc', 'base/winsock_init.cc',
...@@ -417,16 +420,6 @@ ...@@ -417,16 +420,6 @@
}, },
], ],
[ 'OS == "mac"', { [ 'OS == "mac"', {
'conditions': [
[ 'use_openssl == 0', {
'dependencies': [
# defaults to nss
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
}],
],
'link_settings': { 'link_settings': {
'libraries': [ 'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework', '$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
...@@ -438,10 +431,6 @@ ...@@ -438,10 +431,6 @@
}, },
], ],
[ 'OS == "ios"', { [ 'OS == "ios"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
'sources!': [ 'sources!': [
'disk_cache/blockfile/file_posix.cc', 'disk_cache/blockfile/file_posix.cc',
], ],
...@@ -463,7 +452,6 @@ ...@@ -463,7 +452,6 @@
}], }],
[ 'OS == "android"', { [ 'OS == "android"', {
'dependencies': [ 'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
'net_jni_headers', 'net_jni_headers',
], ],
'sources!': [ 'sources!': [
...@@ -597,11 +585,18 @@ ...@@ -597,11 +585,18 @@
'../build/linux/system.gyp:ssl', '../build/linux/system.gyp:ssl',
], ],
}, { # desktop_linux == 0 and chromeos == 0 }, { # desktop_linux == 0 and chromeos == 0
'dependencies': [
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
'sources!': [ 'sources!': [
'cert/nss_cert_database_unittest.cc', 'cert/nss_cert_database_unittest.cc',
], ],
}], }],
], ],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
}], }],
[ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', { [ 'os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
'conditions': [ 'conditions': [
...@@ -643,7 +638,7 @@ ...@@ -643,7 +638,7 @@
'cert/x509_util_nss_unittest.cc', 'cert/x509_util_nss_unittest.cc',
'quic/test_tools/crypto_test_utils_nss.cc', 'quic/test_tools/crypto_test_utils_nss.cc',
], ],
}, { # else !use_openssl: remove the unneeded files }, { # else !use_openssl: remove the unneeded files and pull in NSS.
'sources!': [ 'sources!': [
'cert/x509_util_openssl_unittest.cc', 'cert/x509_util_openssl_unittest.cc',
'quic/test_tools/crypto_test_utils_openssl.cc', 'quic/test_tools/crypto_test_utils_openssl.cc',
...@@ -715,11 +710,6 @@ ...@@ -715,11 +710,6 @@
'dns/dns_config_service_posix_unittest.cc', 'dns/dns_config_service_posix_unittest.cc',
'http/http_auth_gssapi_posix_unittest.cc', 'http/http_auth_gssapi_posix_unittest.cc',
], ],
'dependencies': [
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
'conditions': [ 'conditions': [
[ 'icu_use_data_file_flag == 0', { [ 'icu_use_data_file_flag == 0', {
# This is needed to trigger the dll copy step on windows. # This is needed to trigger the dll copy step on windows.
...@@ -729,22 +719,9 @@ ...@@ -729,22 +719,9 @@
], ],
}], }],
], ],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
},
],
[ 'OS == "mac" and use_openssl == 0', {
'dependencies': [
'../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
}, },
], ],
[ 'OS == "ios"', { [ 'OS == "ios"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
],
'actions': [ 'actions': [
{ {
'action_name': 'copy_test_data', 'action_name': 'copy_test_data',
...@@ -790,9 +767,6 @@ ...@@ -790,9 +767,6 @@
], ],
}], }],
[ 'OS == "android"', { [ 'OS == "android"', {
'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
],
'sources!': [ 'sources!': [
'dns/dns_config_service_posix_unittest.cc', 'dns/dns_config_service_posix_unittest.cc',
], ],
...@@ -981,18 +955,22 @@ ...@@ -981,18 +955,22 @@
'../third_party/protobuf/protobuf.gyp:py_proto', '../third_party/protobuf/protobuf.gyp:py_proto',
], ],
}], }],
['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', { ['use_openssl == 0 and (use_nss == 1 or OS == "ios")', {
'conditions': [ 'conditions': [
['use_openssl==1', { [ 'desktop_linux == 1 or chromeos == 1', {
'dependencies': [ 'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl', '../build/linux/system.gyp:ssl',
], ],
}, { }, { # desktop_linux == 0 and chromeos == 0
'dependencies': [ 'dependencies': [
'../build/linux/system.gyp:ssl', '../third_party/nss/nss.gyp:nspr',
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
], ],
}], }],
], ],
# TODO(jschuh): crbug.com/167187 fix size_t to int truncations.
'msvs_disabled_warnings': [4267, ],
}], }],
['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', { ['os_posix == 1 and OS != "mac" and OS != "android" and OS != "ios"', {
'conditions': [ 'conditions': [
...@@ -1011,11 +989,6 @@ ...@@ -1011,11 +989,6 @@
'test/spawned_test_server/spawner_communicator.h', 'test/spawned_test_server/spawner_communicator.h',
], ],
}], }],
['OS == "ios"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
],
}],
[ 'use_v8_in_net==1', { [ 'use_v8_in_net==1', {
'dependencies': [ 'dependencies': [
'net_with_v8', 'net_with_v8',
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment