aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/OpenSSLCrypto.cpp
diff options
context:
space:
mode:
authorOvahlord <dreadkiller@gmx.de>2024-05-12 15:48:39 +0200
committerShauren <shauren.trinity@gmail.com>2024-05-12 15:48:39 +0200
commit728e7c7fcf2435172a86e621746db5218bdda0cd (patch)
treebea95b46f6208eac21900f854c3e7b01fef28367 /src/common/Cryptography/OpenSSLCrypto.cpp
parent500301b96256792357b13ef78d7e1836028cff26 (diff)
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
Diffstat (limited to 'src/common/Cryptography/OpenSSLCrypto.cpp')
-rw-r--r--src/common/Cryptography/OpenSSLCrypto.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/src/common/Cryptography/OpenSSLCrypto.cpp b/src/common/Cryptography/OpenSSLCrypto.cpp
index 2d0ccfc526f..db5e2e01533 100644
--- a/src/common/Cryptography/OpenSSLCrypto.cpp
+++ b/src/common/Cryptography/OpenSSLCrypto.cpp
@@ -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