Loading crypto/provider_core.c +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ struct ossl_provider_st { OSSL_provider_teardown_fn *teardown; OSSL_provider_get_param_types_fn *get_param_types; OSSL_provider_get_params_fn *get_params; OSSL_provider_query_operation_fn *query_operation; }; DEFINE_STACK_OF(OSSL_PROVIDER) Loading Loading @@ -319,6 +320,10 @@ int ossl_provider_activate(OSSL_PROVIDER *prov) prov->get_params = OSSL_get_provider_get_params(provider_dispatch); break; case OSSL_FUNC_PROVIDER_QUERY_OPERATION: prov->query_operation = OSSL_get_provider_query_operation(provider_dispatch); break; } } Loading Loading @@ -392,6 +397,14 @@ int ossl_provider_get_params(const OSSL_PROVIDER *prov, return prov->get_params == NULL ? 0 : prov->get_params(prov, params); } const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache) { return prov->query_operation(prov, operation_id, no_cache); } /*- * Core functions for the provider * =============================== Loading doc/internal/man3/ossl_provider_new.pod +10 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ ossl_provider_activate, ossl_provider_forall_loaded, ossl_provider_name, ossl_provider_dso, ossl_provider_module_name, ossl_provider_module_path, ossl_provider_teardown, ossl_provider_get_param_types, ossl_provider_get_params - internal provider routines ossl_provider_get_params, ossl_provider_query_operation - internal provider routines =head1 SYNOPSIS Loading Loading @@ -43,6 +44,9 @@ ossl_provider_get_params - internal provider routines const OSSL_ITEM *ossl_provider_get_param_types(const OSSL_PROVIDER *prov); int ossl_provider_get_params(const OSSL_PROVIDER *prov, const OSSL_PARAM params[]); const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache); =head1 DESCRIPTION Loading Loading @@ -137,6 +141,11 @@ responder. It should treat the given C<OSSL_PARAM> array as described in L<OSSL_PARAM(3)>. ossl_provider_query_operation() calls the provider's C<query_operation> function, if the provider has one. It should return an array of C<OSSL_ALGORITHM> for the given C<operation_id>. =head1 NOTES Locating a provider module happens as follows: Loading include/internal/provider.h +3 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,9 @@ void ossl_provider_teardown(const OSSL_PROVIDER *prov); const OSSL_ITEM *ossl_provider_get_param_types(const OSSL_PROVIDER *prov); int ossl_provider_get_params(const OSSL_PROVIDER *prov, const OSSL_PARAM params[]); const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache); # ifdef __cplusplus } Loading include/openssl/core_numbers.h +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *, # define OSSL_FUNC_PROVIDER_GET_PARAMS 1026 OSSL_CORE_MAKE_FUNC(int,provider_get_params,(const OSSL_PROVIDER *prov, const OSSL_PARAM params[])) # define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027 OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *,provider_query_operation, (const OSSL_PROVIDER *, int operation_id, const int *no_store)) # ifdef __cplusplus Loading Loading
crypto/provider_core.c +13 −0 Original line number Diff line number Diff line Loading @@ -39,6 +39,7 @@ struct ossl_provider_st { OSSL_provider_teardown_fn *teardown; OSSL_provider_get_param_types_fn *get_param_types; OSSL_provider_get_params_fn *get_params; OSSL_provider_query_operation_fn *query_operation; }; DEFINE_STACK_OF(OSSL_PROVIDER) Loading Loading @@ -319,6 +320,10 @@ int ossl_provider_activate(OSSL_PROVIDER *prov) prov->get_params = OSSL_get_provider_get_params(provider_dispatch); break; case OSSL_FUNC_PROVIDER_QUERY_OPERATION: prov->query_operation = OSSL_get_provider_query_operation(provider_dispatch); break; } } Loading Loading @@ -392,6 +397,14 @@ int ossl_provider_get_params(const OSSL_PROVIDER *prov, return prov->get_params == NULL ? 0 : prov->get_params(prov, params); } const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache) { return prov->query_operation(prov, operation_id, no_cache); } /*- * Core functions for the provider * =============================== Loading
doc/internal/man3/ossl_provider_new.pod +10 −1 Original line number Diff line number Diff line Loading @@ -8,7 +8,8 @@ ossl_provider_activate, ossl_provider_forall_loaded, ossl_provider_name, ossl_provider_dso, ossl_provider_module_name, ossl_provider_module_path, ossl_provider_teardown, ossl_provider_get_param_types, ossl_provider_get_params - internal provider routines ossl_provider_get_params, ossl_provider_query_operation - internal provider routines =head1 SYNOPSIS Loading Loading @@ -43,6 +44,9 @@ ossl_provider_get_params - internal provider routines const OSSL_ITEM *ossl_provider_get_param_types(const OSSL_PROVIDER *prov); int ossl_provider_get_params(const OSSL_PROVIDER *prov, const OSSL_PARAM params[]); const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache); =head1 DESCRIPTION Loading Loading @@ -137,6 +141,11 @@ responder. It should treat the given C<OSSL_PARAM> array as described in L<OSSL_PARAM(3)>. ossl_provider_query_operation() calls the provider's C<query_operation> function, if the provider has one. It should return an array of C<OSSL_ALGORITHM> for the given C<operation_id>. =head1 NOTES Locating a provider module happens as follows: Loading
include/internal/provider.h +3 −0 Original line number Diff line number Diff line Loading @@ -59,6 +59,9 @@ void ossl_provider_teardown(const OSSL_PROVIDER *prov); const OSSL_ITEM *ossl_provider_get_param_types(const OSSL_PROVIDER *prov); int ossl_provider_get_params(const OSSL_PROVIDER *prov, const OSSL_PARAM params[]); const OSSL_ALGORITHM *ossl_provider_query_operation(const OSSL_PROVIDER *prov, int operation_id, int *no_cache); # ifdef __cplusplus } Loading
include/openssl/core_numbers.h +4 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,10 @@ OSSL_CORE_MAKE_FUNC(const OSSL_ITEM *, # define OSSL_FUNC_PROVIDER_GET_PARAMS 1026 OSSL_CORE_MAKE_FUNC(int,provider_get_params,(const OSSL_PROVIDER *prov, const OSSL_PARAM params[])) # define OSSL_FUNC_PROVIDER_QUERY_OPERATION 1027 OSSL_CORE_MAKE_FUNC(const OSSL_ALGORITHM *,provider_query_operation, (const OSSL_PROVIDER *, int operation_id, const int *no_store)) # ifdef __cplusplus Loading