提交 993c437d 编写于 作者: N Nicola Tuveri

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: NTomas Mraz <tmraz@fedoraproject.org>
Reviewed-by: NPaul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/13058)
上级 62f27ab9
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册