Core/Cryptography: dropped support for OpenSSL 1.1

OpenSSL 1.1 has been deprecated for quite some time now so it is time to put it to rest. Please upgrade to OpenSSL 3.x
This commit is contained in:
Ovahlord
2024-05-12 15:48:39 +02:00
committed by Shauren
parent 500301b962
commit 728e7c7fcf
7 changed files with 5 additions and 171 deletions

View File

@@ -17,11 +17,9 @@
#include "OpenSSLCrypto.h"
#include <openssl/crypto.h>
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#include <openssl/provider.h>
OSSL_PROVIDER* LegacyProvider;
#endif
void OpenSSLCrypto::threadsSetup([[maybe_unused]] boost::filesystem::path const& providerModulePath)
{
@@ -29,20 +27,16 @@ void OpenSSLCrypto::threadsSetup([[maybe_unused]] boost::filesystem::path const&
ValgrindRandomSetup();
#endif
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
#if TRINITY_PLATFORM == TRINITY_PLATFORM_WINDOWS
OSSL_PROVIDER_set_default_search_path(nullptr, providerModulePath.string().c_str());
#endif
LegacyProvider = OSSL_PROVIDER_try_load(nullptr, "legacy", 1);
#endif
}
void OpenSSLCrypto::threadsCleanup()
{
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
OSSL_PROVIDER_unload(LegacyProvider);
OSSL_PROVIDER_set_default_search_path(nullptr, nullptr);
#endif
}
#ifdef VALGRIND