#3567: check legacy provider existence for legacy exception #3567

This commit is contained in:
Günter Obiltschnig
2022-04-20 12:19:21 +02:00
parent 60100d839f
commit 11dbce9a55
2 changed files with 4 additions and 4 deletions

View File

@@ -63,10 +63,10 @@ public:
/// Shuts down the OpenSSL machinery.
static bool isFIPSEnabled();
// Returns true if FIPS mode is enabled, false otherwise.
/// Returns true if FIPS mode is enabled, false otherwise.
static void enableFIPSMode(bool enabled);
// Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything.
/// Enable or disable FIPS mode. If FIPS is not available, this method doesn't do anything.
protected:
enum

View File

@@ -137,7 +137,7 @@ void OpenSSLInitializer::initialize()
if (!_legacyProvider)
{
_legacyProvider = OSSL_PROVIDER_load(NULL, "legacy");
if (!_defaultProvider) throw CryptoException("Failed to load OpenSSL legacy provider");
if (!_legacyProvider) throw CryptoException("Failed to load OpenSSL legacy provider");
}
#endif
}