fix(common): OpenSSLCrypto provider API only for OpenSSL 3+

This commit is contained in:
Dawnforger
2026-05-08 20:36:25 -05:00
parent fdc5849a69
commit e2bed00b5c
+10
View File
@@ -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