Skip to content

Require OpenSSL 1.1.1 as minimum #8111

@xavier2k6

Description

@xavier2k6

Drop support of OpenSSL 1.0.x entirely & make OpenSSL 1.1.1 the minimum

#if OPENSSL_VERSION_NUMBER < 0x1000000fL

libtorrent/src/ssl.cpp

Lines 175 to 205 in 15f596e

#if defined TORRENT_USE_OPENSSL
namespace {
struct lifecycle
{
lifecycle()
{
// this is needed for openssl < 1.0 to decrypt keys created by openssl 1.0+
#if !defined(OPENSSL_API_COMPAT) || (OPENSSL_API_COMPAT < 0x10100000L)
OpenSSL_add_all_algorithms();
#else
OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS | OPENSSL_INIT_ADD_ALL_DIGESTS, nullptr);
#endif
}
~lifecycle()
{
// by openssl changelog at https://www.openssl.org/news/changelog.html
// Changes between 1.0.2h and 1.1.0 [25 Aug 2016]
// - Most global cleanup functions are no longer required because they are handled
// via auto-deinit. Affected function CRYPTO_cleanup_all_ex_data()
#if !defined(OPENSSL_API_COMPAT) || OPENSSL_API_COMPAT < 0x10100000L
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
#endif
// openssl requires this to clean up internal structures it allocates
CRYPTO_cleanup_all_ex_data();
#ifdef TORRENT_MACOS_DEPRECATED_LIBCRYPTO
#pragma clang diagnostic pop
#endif
#endif

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions