diff options
author | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2020-06-21 01:19:16 +0200 |
---|---|---|
committer | Dr. Matthias St. Pierre <matthias.st.pierre@ncp-e.com> | 2020-06-24 22:01:22 +0200 |
commit | 363b1e5daea4a01889e6ff27148018be63d33b9b (patch) | |
tree | 9e6f5fe3be912b433fa848c44df11a15d0aa2921 /providers/legacyprov.c | |
parent | 23c48d94d4d34eedc15fa65e0fa0e38a6137e09f (diff) |
Make the naming scheme for dispatched functions more consistent
The new naming scheme consistently usese the `OSSL_FUNC_` prefix for all
functions which are dispatched between the core and providers.
This change includes in particular all up- and downcalls, i.e., the
dispatched functions passed from core to provider and vice versa.
- OSSL_core_ -> OSSL_FUNC_core_
- OSSL_provider_ -> OSSL_FUNC_core_
For operations and their function dispatch tables, the following convention
is used:
Type | Name (evp_generic_fetch(3)) |
---------------------|-----------------------------------|
operation | OSSL_OP_FOO |
function id | OSSL_FUNC_FOO_FUNCTION_NAME |
function "name" | OSSL_FUNC_foo_function_name |
function typedef | OSSL_FUNC_foo_function_name_fn |
function ptr getter | OSSL_FUNC_foo_function_name |
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12222)
Diffstat (limited to 'providers/legacyprov.c')
-rw-r--r-- | providers/legacyprov.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/providers/legacyprov.c b/providers/legacyprov.c index 288c17d2e4..adf7c82374 100644 --- a/providers/legacyprov.c +++ b/providers/legacyprov.c @@ -20,9 +20,9 @@ * Forward declarations to ensure that interface functions are correctly * defined. */ -static OSSL_provider_gettable_params_fn legacy_gettable_params; -static OSSL_provider_get_params_fn legacy_get_params; -static OSSL_provider_query_operation_fn legacy_query; +static OSSL_FUNC_provider_gettable_params_fn legacy_gettable_params; +static OSSL_FUNC_provider_get_params_fn legacy_get_params; +static OSSL_FUNC_provider_query_operation_fn legacy_query; #define ALG(NAMES, FUNC) { NAMES, "provider=legacy", FUNC } @@ -32,8 +32,8 @@ OSSL_provider_init_fn ossl_legacy_provider_init; #endif /* Functions provided by the core */ -static OSSL_core_gettable_params_fn *c_gettable_params = NULL; -static OSSL_core_get_params_fn *c_get_params = NULL; +static OSSL_FUNC_core_gettable_params_fn *c_gettable_params = NULL; +static OSSL_FUNC_core_get_params_fn *c_get_params = NULL; /* Parameters we provide to the core */ static const OSSL_PARAM legacy_param_types[] = { @@ -175,19 +175,19 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle, const OSSL_DISPATCH **out, void **provctx) { - OSSL_core_get_library_context_fn *c_get_libctx = NULL; + OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL; OPENSSL_CTX *libctx = NULL; for (; in->function_id != 0; in++) { switch (in->function_id) { case OSSL_FUNC_CORE_GETTABLE_PARAMS: - c_gettable_params = OSSL_get_core_gettable_params(in); + c_gettable_params = OSSL_FUNC_core_gettable_params(in); break; case OSSL_FUNC_CORE_GET_PARAMS: - c_get_params = OSSL_get_core_get_params(in); + c_get_params = OSSL_FUNC_core_get_params(in); break; case OSSL_FUNC_CORE_GET_LIBRARY_CONTEXT: - c_get_libctx = OSSL_get_core_get_library_context(in); + c_get_libctx = OSSL_FUNC_core_get_library_context(in); break; /* Just ignore anything we don't understand */ default: |