Only configure the SSL library in one place.
Build settings now use use_openssl in both Chromium and standalone builds. It moves all the platform-specific SSL-related build checks to be conditioned on this flag as appropriate. This is to avoid colliding with Chromium's transition away from NSS. This is a fixup of https://webrtc-codereview.appspot.com/29559004 to avoid breaking use_legacy_ssl_defaults. BUG=chromium:413497 R=henrike@webrtc.org Review URL: https://webrtc-codereview.appspot.com/24109004 git-svn-id: http://webrtc.googlecode.com/svn/trunk@7537 4adac7df-926f-26a2-2b94-8c16560cd09d
This commit is contained in:
@ -40,7 +40,7 @@ config("openssl_config") {
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
config("no_openssl_config") {
|
config("nss_config") {
|
||||||
defines = [
|
defines = [
|
||||||
"SSL_USE_NSS",
|
"SSL_USE_NSS",
|
||||||
"HAVE_NSS_SSL_H",
|
"HAVE_NSS_SSL_H",
|
||||||
@ -465,24 +465,30 @@ static_library("webrtc_base") {
|
|||||||
"opensslstreamadapter.h",
|
"opensslstreamadapter.h",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
public_configs += [ ":no_openssl_config" ]
|
public_configs += [ ":nss_config" ]
|
||||||
|
if (rtc_build_ssl) {
|
||||||
|
if (build_with_chromium) {
|
||||||
|
deps += [ "//crypto:platform" ]
|
||||||
|
} else {
|
||||||
|
deps += [ "//net/third_party/nss/ssl:libssl" ]
|
||||||
|
if (is_linux) {
|
||||||
|
deps += [ ":linux_system_ssl" ]
|
||||||
|
} else {
|
||||||
|
deps += [
|
||||||
|
"//third_party/nss:nspr",
|
||||||
|
"//third_party/nss:nss",
|
||||||
|
]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
configs += [ "external_ssl_library" ]
|
||||||
|
}
|
||||||
sources += [
|
sources += [
|
||||||
"nssidentity.cc",
|
"nssidentity.cc",
|
||||||
"nssidentity.h",
|
"nssidentity.h",
|
||||||
"nssstreamadapter.cc",
|
"nssstreamadapter.cc",
|
||||||
"nssstreamadapter.h",
|
"nssstreamadapter.h",
|
||||||
]
|
]
|
||||||
if (is_mac || is_ios || is_win) {
|
|
||||||
if (rtc_build_ssl) {
|
|
||||||
deps += [
|
|
||||||
"//net/third_party/nss/ssl:libssl",
|
|
||||||
"//third_party/nss:nspr",
|
|
||||||
"//third_party/nss:nss",
|
|
||||||
]
|
|
||||||
} else {
|
|
||||||
configs += [ "external_ssl_library" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_android) {
|
if (is_android) {
|
||||||
@ -518,13 +524,9 @@ static_library("webrtc_base") {
|
|||||||
|
|
||||||
if (is_linux) {
|
if (is_linux) {
|
||||||
libs += [
|
libs += [
|
||||||
"crypto",
|
|
||||||
"dl",
|
"dl",
|
||||||
"rt",
|
"rt",
|
||||||
]
|
]
|
||||||
if (rtc_build_ssl) {
|
|
||||||
configs += [ "//third_party/nss:system_nss_no_ssl_config" ]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_mac) {
|
if (is_mac) {
|
||||||
@ -595,16 +597,4 @@ static_library("webrtc_base") {
|
|||||||
"linux.h",
|
"linux.h",
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (is_posix && !is_mac && !is_ios && !is_android) {
|
|
||||||
if (build_with_chromium) {
|
|
||||||
deps += [ "//crypto:platform" ]
|
|
||||||
} else {
|
|
||||||
if (rtc_build_ssl) {
|
|
||||||
deps += [ ":linux_system_ssl" ]
|
|
||||||
} else {
|
|
||||||
configs += [ "external_ssl_library" ]
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
@ -539,14 +539,23 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
}],
|
}],
|
||||||
['OS=="mac" or OS=="ios" or OS=="win"', {
|
|
||||||
'conditions': [
|
|
||||||
['build_ssl==1', {
|
['build_ssl==1', {
|
||||||
|
'conditions': [
|
||||||
|
# On some platforms, the rest of NSS is bundled. On others,
|
||||||
|
# it's pulled from the system.
|
||||||
|
['OS == "mac" or OS == "ios" or OS == "win"', {
|
||||||
'dependencies': [
|
'dependencies': [
|
||||||
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
|
'<(DEPTH)/net/third_party/nss/ssl.gyp:libssl',
|
||||||
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
|
'<(DEPTH)/third_party/nss/nss.gyp:nspr',
|
||||||
'<(DEPTH)/third_party/nss/nss.gyp:nss',
|
'<(DEPTH)/third_party/nss/nss.gyp:nss',
|
||||||
],
|
],
|
||||||
|
}],
|
||||||
|
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
|
||||||
|
'dependencies': [
|
||||||
|
'<(DEPTH)/build/linux/system.gyp:ssl',
|
||||||
|
],
|
||||||
|
}],
|
||||||
|
],
|
||||||
}, {
|
}, {
|
||||||
'include_dirs': [
|
'include_dirs': [
|
||||||
'<(ssl_root)',
|
'<(ssl_root)',
|
||||||
@ -554,17 +563,7 @@
|
|||||||
}],
|
}],
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
],
|
|
||||||
}],
|
|
||||||
['OS == "android"', {
|
['OS == "android"', {
|
||||||
'defines': [
|
|
||||||
'HAVE_OPENSSL_SSL_H'
|
|
||||||
],
|
|
||||||
'direct_dependent_settings': {
|
|
||||||
'defines': [
|
|
||||||
'HAVE_OPENSSL_SSL_H'
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'link_settings': {
|
'link_settings': {
|
||||||
'libraries': [
|
'libraries': [
|
||||||
'-llog',
|
'-llog',
|
||||||
@ -572,20 +571,6 @@
|
|||||||
],
|
],
|
||||||
},
|
},
|
||||||
}, {
|
}, {
|
||||||
'conditions': [
|
|
||||||
['use_legacy_ssl_defaults!=1', {
|
|
||||||
'defines': [
|
|
||||||
'HAVE_NSS_SSL_H',
|
|
||||||
'SSL_USE_NSS_RNG',
|
|
||||||
],
|
|
||||||
'direct_dependent_settings': {
|
|
||||||
'defines': [
|
|
||||||
'HAVE_NSS_SSL_H',
|
|
||||||
'SSL_USE_NSS_RNG',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'ifaddrs-android.cc',
|
'ifaddrs-android.cc',
|
||||||
'ifaddrs-android.h',
|
'ifaddrs-android.h',
|
||||||
@ -627,21 +612,6 @@
|
|||||||
'-lrt',
|
'-lrt',
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
'conditions': [
|
|
||||||
['build_ssl==1', {
|
|
||||||
'link_settings': {
|
|
||||||
'libraries': [
|
|
||||||
'<!@(<(pkg-config) --libs-only-l nss | sed -e "s/-lssl3//")',
|
|
||||||
],
|
|
||||||
},
|
|
||||||
'cflags': [
|
|
||||||
'<!@(<(pkg-config) --cflags nss)',
|
|
||||||
],
|
|
||||||
'ldflags': [
|
|
||||||
'<!@(<(pkg-config) --libs-only-L --libs-only-other nss)',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}, {
|
}, {
|
||||||
'sources!': [
|
'sources!': [
|
||||||
'dbus.cc',
|
'dbus.cc',
|
||||||
@ -757,19 +727,6 @@
|
|||||||
'linux.h',
|
'linux.h',
|
||||||
],
|
],
|
||||||
}],
|
}],
|
||||||
['os_posix == 1 and OS != "mac" and OS != "ios" and OS != "android"', {
|
|
||||||
'conditions': [
|
|
||||||
['build_ssl==1', {
|
|
||||||
'dependencies': [
|
|
||||||
'<(DEPTH)/build/linux/system.gyp:ssl',
|
|
||||||
],
|
|
||||||
}, {
|
|
||||||
'include_dirs': [
|
|
||||||
'<(ssl_root)',
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
|
||||||
}],
|
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
Reference in New Issue
Block a user