aboutsummaryrefslogtreecommitdiff
path: root/src/common/Cryptography/OpenSSLCrypto.cpp
diff options
context:
space:
mode:
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