fix(common): OpenSSLCrypto provider API only for OpenSSL 3+
This commit is contained in:
@@ -17,6 +17,9 @@
|
||||
|
||||
#include "OpenSSLCrypto.h"
|
||||
#include <openssl/crypto.h> // NOTE: this import is NEEDED (even though some IDEs report it as unused)
|
||||
#include <openssl/opensslv.h>
|
||||
|
||||
#if OPENSSL_VERSION_NUMBER >= 0x30000000L
|
||||
#include <openssl/provider.h>
|
||||
|
||||
OSSL_PROVIDER* LegacyProvider;
|
||||
@@ -53,3 +56,10 @@ void OpenSSLCrypto::threadsCleanup()
|
||||
OSSL_PROVIDER_unload(DefaultProvider);
|
||||
OSSL_PROVIDER_set_default_search_path(nullptr, nullptr);
|
||||
}
|
||||
|
||||
#else
|
||||
|
||||
void OpenSSLCrypto::threadsSetup() {}
|
||||
void OpenSSLCrypto::threadsCleanup() {}
|
||||
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user