return ret;
}
+int ossl_provider_activate_fallbacks(OSSL_LIB_CTX *ctx)
+{
+ struct provider_store_st *store = get_provider_store(ctx);
+
+ if (store == NULL)
+ return 0;
+
+ return provider_activate_fallbacks(store);
+}
+
int ossl_provider_doall_activated(OSSL_LIB_CTX *ctx,
int (*cb)(OSSL_PROVIDER *provider,
void *cbdata),
/* Return pointer to the provider's context */
void *ossl_provider_ctx(const OSSL_PROVIDER *prov);
+/* Force loading of fallback providers if necessary */
+int ossl_provider_activate_fallbacks(OSSL_LIB_CTX *ctx);
+
/* Iterate over all loaded providers */
int ossl_provider_doall_activated(OSSL_LIB_CTX *,
int (*cb)(OSSL_PROVIDER *provider,
#include <openssl/proverr.h>
#include <openssl/indicator.h>
#include "internal/cryptlib.h"
+#include "internal/provider.h"
#include "prov/implementations.h"
#include "prov/names.h"
#include "prov/provider_ctx.h"
if (!ossl_thread_register_fips(libctx))
goto err;
+ /*
+ * Ensure our internal provider is loaded. We use this whenever the FIPS
+ * provider internally uses the EVP API. We proactively load this now
+ * rather than waiting for lazy loading to ensure it is always present when
+ * we need it.
+ */
+ if (!ossl_provider_activate_fallbacks(libctx))
+ goto err;
+
/*
* We did initial set up of selftest_params in a local copy, because we
* could not create fgbl until c_CRYPTO_zalloc was defined in the loop