If the macro OSSL_FORCE_NO_CACHE_FETCH is defined, no provider will have its
fetches cached.
Reviewed-by: Shane Lontis <shane.lontis@oracle.com>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/14126)
int operation_id,
int *no_cache)
{
- return prov->query_operation == NULL
- ? NULL : prov->query_operation(prov->provctx, operation_id, no_cache);
+ const OSSL_ALGORITHM *res;
+
+ if (prov->query_operation == NULL)
+ return NULL;
+ res = prov->query_operation(prov->provctx, operation_id, no_cache);
+#if defined(OPENSSL_NO_CACHED_FETCH)
+ /* Forcing the non-caching of queries */
+ if (no_cache != NULL)
+ *no_cache = 1;
+#endif
+ return res;
}
int ossl_provider_set_operation_bit(OSSL_PROVIDER *provider, size_t bitnum)