commit | 2cb3c542735a23a886f41757384f686b4f0d90e0 | [log] [tgz] |
---|---|---|
author | Philipp Hancke <phancke@meta.com> | Wed May 08 18:52:05 2024 |
committer | WebRTC LUCI CQ <webrtc-scoped@luci-project-accounts.iam.gserviceaccount.com> | Mon May 13 17:04:10 2024 |
tree | b20c4daa29a1f30edf5f08d3b6e7f9ebf8665276 | |
parent | 16fb7903e546051483720548168cd40cded7a040 [diff] |
tls: replace call to deprecated SSL_library_init with OPENSSL_init_ssl SSL_library_init https://www.openssl.org/docs/manmaster/man3/SSL_library_init.html has been deprecated by OPENSSL_init_ssl https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_init_ssl.html which no longer needs to be called as of OpenSSL 1.1.0 (2017). It is still required for boringssl for the time being: https://bugs.chromium.org/p/boringssl/issues/detail?id=35 https://bugs.chromium.org/p/boringssl/issues/detail?id=673 so a TODO is added. BUG=webrtc:339300437 Change-Id: If4c7a9f4935521b33fc19b5fff72d293c0e17b81 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/350145 Reviewed-by: David Benjamin <davidben@webrtc.org> Commit-Queue: Philipp Hancke <phancke@meta.com> Reviewed-by: Harald Alvestrand <hta@webrtc.org> Cr-Commit-Position: refs/heads/main@{#42291}
diff --git a/rtc_base/openssl_adapter.cc b/rtc_base/openssl_adapter.cc index e48cdf4..2743859 100644 --- a/rtc_base/openssl_adapter.cc +++ b/rtc_base/openssl_adapter.cc
@@ -170,16 +170,12 @@ using ::webrtc::TimeDelta; bool OpenSSLAdapter::InitializeSSL() { - if (!SSL_library_init()) - return false; -#if !defined(ADDRESS_SANITIZER) || !defined(WEBRTC_MAC) || defined(WEBRTC_IOS) - // Loading the error strings crashes mac_asan. Omit this debugging aid there. - SSL_load_error_strings(); -#endif - ERR_load_BIO_strings(); - OpenSSL_add_all_algorithms(); - RAND_poll(); - return true; + // TODO: https://issues.webrtc.org/issues/339300437 - remove once + // BoringSSL no longer requires this after + // https://bugs.chromium.org/p/boringssl/issues/detail?id=35 + // In OpenSSL it is supposed to be a no-op as of 1.1: + // https://www.openssl.org/docs/man1.1.1/man3/OPENSSL_init_ssl.html + return OPENSSL_init_ssl(0, nullptr); } bool OpenSSLAdapter::CleanupSSL() {