mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user