From b0001d0cf2539b9309712e3e04f407dcbb04352c Mon Sep 17 00:00:00 2001 From: Pauli Date: Fri, 25 Sep 2020 10:19:19 +1000 Subject: provider: add an unquery function to allow providers to clean up. Without this, a provider has no way to know that an application has finished with the array it returned earlier. A non-caching provider requires this information. Fixes #12974 Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/12974) --- doc/man7/provider-base.pod | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'doc/man7') diff --git a/doc/man7/provider-base.pod b/doc/man7/provider-base.pod index 8659431437..3b4416dac0 100644 --- a/doc/man7/provider-base.pod +++ b/doc/man7/provider-base.pod @@ -86,6 +86,8 @@ provider-base const OSSL_ALGORITHM *provider_query_operation(void *provctx, int operation_id, const int *no_store); + void provider_unquery_operation(void *provctx, int operation_id, + const OSSL_ALGORITHM *algs); const OSSL_ITEM *provider_get_reason_strings(void *provctx); int provider_get_capabilities(void *provctx, const char *capability, OSSL_CALLBACK *cb, void *arg); @@ -154,6 +156,7 @@ F): provider_gettable_params OSSL_FUNC_PROVIDER_GETTABLE_PARAMS provider_get_params OSSL_FUNC_PROVIDER_GET_PARAMS provider_query_operation OSSL_FUNC_PROVIDER_QUERY_OPERATION + provider_unquery_operation OSSL_FUNC_PROVIDER_UNQUERY_OPERATION provider_get_reason_strings OSSL_FUNC_PROVIDER_GET_REASON_STRINGS provider_get_capabilities OSSL_FUNC_PROVIDER_GET_CAPABILITIES provider_self_test OSSL_FUNC_PROVIDER_SELF_TEST @@ -274,6 +277,11 @@ It should indicate if the core may store a reference to this array by setting I<*no_store> to 0 (core may store a reference) or 1 (core may not store a reference). +provider_unquery_operation() informs the provider that the result of a +provider_query_operation() is no longer directly required and that the function +pointers have been copied. The I should match that passed to +provider_query_operation() and I should be its return value. + provider_get_reason_strings() should return a constant B array that provides reason strings for reason codes the provider may use when reporting errors using core_put_error(). -- cgit v1.2.3