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") {
"udp/udp_socket_libevent.cc",
"udp/udp_socket_libevent.h",
]
deps += [
"//third_party/nss:nspr",
"//third_party/nss",
]
} else { # !is_win
sources -= [
"base/winsock_init.cc",
......@@ -474,12 +470,6 @@ component("net") {
}
if (is_mac) {
if (!use_openssl) {
deps += [
"//third_party/nss:nspr",
"//third_party/nss",
]
}
libs = [
"Foundation.framework",
"Security.framework",
......@@ -509,9 +499,6 @@ component("net") {
set_sources_assignment_filter(sources_assignment_filter)
sources -= [ "disk_cache/blockfile/file_posix.cc" ]
deps += [
"//third_party/nss",
]
libs = [
"CFNetwork.framework",
"MobileCoreServices.framework",
......@@ -708,8 +695,8 @@ source_set("test_support") {
"//url",
]
if (is_ios) {
public_deps += [ "//third_party/nss" ]
if (!use_openssl && (use_nss_certs || is_ios)) {
public_deps += ["//crypto:platform" ]
}
if (!is_android) {
......@@ -732,9 +719,7 @@ source_set("test_support") {
]
}
if (use_nss_certs) {
public_deps += ["//crypto:platform" ]
} else {
if (!use_nss_certs) {
sources -= [
"test/cert_test_util_nss.cc",
]
......
......@@ -252,7 +252,7 @@
'../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!': [
'base/crypto_module_openssl.cc',
'cert/ct_log_verifier_openssl.cc',
......@@ -283,6 +283,22 @@
'ssl/openssl_ssl_util.cc',
'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', {
......@@ -308,12 +324,6 @@
}],
[ 'desktop_linux == 1 or chromeos == 1', {
'conditions': [
['use_openssl == 0', {
# use NSS
'dependencies': [
'../build/linux/system.gyp:ssl',
],
}],
['os_bsd==1', {
'sources!': [
'base/network_change_notifier_linux.cc',
......@@ -398,13 +408,6 @@
'udp/udp_socket_libevent.cc',
'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"
'sources!': [
'base/winsock_init.cc',
......@@ -417,16 +420,6 @@
},
],
[ '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': {
'libraries': [
'$(SDKROOT)/System/Library/Frameworks/Foundation.framework',
......@@ -438,10 +431,6 @@
},
],
[ 'OS == "ios"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
'third_party/nss/ssl.gyp:libssl',
],
'sources!': [
'disk_cache/blockfile/file_posix.cc',
],
......@@ -463,7 +452,6 @@
}],
[ 'OS == "android"', {
'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
'net_jni_headers',
],
'sources!': [
......@@ -597,11 +585,18 @@
'../build/linux/system.gyp:ssl',
],
}, { # 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!': [
'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"', {
'conditions': [
......@@ -643,7 +638,7 @@
'cert/x509_util_nss_unittest.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!': [
'cert/x509_util_openssl_unittest.cc',
'quic/test_tools/crypto_test_utils_openssl.cc',
......@@ -715,11 +710,6 @@
'dns/dns_config_service_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': [
[ 'icu_use_data_file_flag == 0', {
# This is needed to trigger the dll copy step on windows.
......@@ -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"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
],
'actions': [
{
'action_name': 'copy_test_data',
......@@ -790,9 +767,6 @@
],
}],
[ 'OS == "android"', {
'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
],
'sources!': [
'dns/dns_config_service_posix_unittest.cc',
],
......@@ -981,18 +955,22 @@
'../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': [
['use_openssl==1', {
[ 'desktop_linux == 1 or chromeos == 1', {
'dependencies': [
'../third_party/boringssl/boringssl.gyp:boringssl',
'../build/linux/system.gyp:ssl',
],
}, {
}, { # desktop_linux == 0 and chromeos == 0
'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"', {
'conditions': [
......@@ -1011,11 +989,6 @@
'test/spawned_test_server/spawner_communicator.h',
],
}],
['OS == "ios"', {
'dependencies': [
'../third_party/nss/nss.gyp:nss',
],
}],
[ 'use_v8_in_net==1', {
'dependencies': [
'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