The branch master has been updated via 993c437dbd14579cbbd55a2742274f10fc7c6e21 (commit) from 62f27ab9dcf29876b15cdae704c3a04b4c8a6344 (commit)
- Log ----------------------------------------------------------------- commit 993c437dbd14579cbbd55a2742274f10fc7c6e21 Author: Nicola Tuveri <nic....@gmail.com> Date: Fri Oct 2 03:58:10 2020 +0300 Fix segfault on missing provider_query_operation() A provider without `provider_query_operation()` is admittedly quite useless, yet technically the base provider functions are not mandatory according to our documentation. Reviewed-by: Tomas Mraz <tm...@fedoraproject.org> Reviewed-by: Paul Dale <paul.d...@oracle.com> (Merged from https://github.com/openssl/openssl/pull/13058) ----------------------------------------------------------------------- Summary of changes: crypto/provider_core.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/crypto/provider_core.c b/crypto/provider_core.c index 754f6df1a4..742d3e2b50 100644 --- a/crypto/provider_core.c +++ b/crypto/provider_core.c @@ -866,7 +866,8 @@ const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache) { - return prov->query_operation(prov->provctx, operation_id, no_cache); + return prov->query_operation == NULL + ? NULL : prov->query_operation(prov->provctx, operation_id, no_cache); } int ossl_provider_set_operation_bit(OSSL_PROVIDER *provider, size_t bitnum)