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/implementations/include/prov/ciphercommon.h | |
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/implementations/include/prov/ciphercommon.h')
-rw-r--r-- | providers/implementations/include/prov/ciphercommon.h | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/providers/implementations/include/prov/ciphercommon.h b/providers/implementations/include/prov/ciphercommon.h index fe3b3143c4..62a8f0f1e8 100644 --- a/providers/implementations/include/prov/ciphercommon.h +++ b/providers/implementations/include/prov/ciphercommon.h @@ -71,22 +71,22 @@ struct prov_cipher_hw_st { void (*copyctx)(PROV_CIPHER_CTX *dst, const PROV_CIPHER_CTX *src); }; -OSSL_OP_cipher_encrypt_init_fn cipher_generic_einit; -OSSL_OP_cipher_decrypt_init_fn cipher_generic_dinit; -OSSL_OP_cipher_update_fn cipher_generic_block_update; -OSSL_OP_cipher_final_fn cipher_generic_block_final; -OSSL_OP_cipher_update_fn cipher_generic_stream_update; -OSSL_OP_cipher_final_fn cipher_generic_stream_final; -OSSL_OP_cipher_cipher_fn cipher_generic_cipher; -OSSL_OP_cipher_get_ctx_params_fn cipher_generic_get_ctx_params; -OSSL_OP_cipher_set_ctx_params_fn cipher_generic_set_ctx_params; -OSSL_OP_cipher_gettable_params_fn cipher_generic_gettable_params; -OSSL_OP_cipher_gettable_ctx_params_fn cipher_generic_gettable_ctx_params; -OSSL_OP_cipher_settable_ctx_params_fn cipher_generic_settable_ctx_params; -OSSL_OP_cipher_set_ctx_params_fn cipher_var_keylen_set_ctx_params; -OSSL_OP_cipher_settable_ctx_params_fn cipher_var_keylen_settable_ctx_params; -OSSL_OP_cipher_gettable_ctx_params_fn cipher_aead_gettable_ctx_params; -OSSL_OP_cipher_settable_ctx_params_fn cipher_aead_settable_ctx_params; +OSSL_FUNC_cipher_encrypt_init_fn cipher_generic_einit; +OSSL_FUNC_cipher_decrypt_init_fn cipher_generic_dinit; +OSSL_FUNC_cipher_update_fn cipher_generic_block_update; +OSSL_FUNC_cipher_final_fn cipher_generic_block_final; +OSSL_FUNC_cipher_update_fn cipher_generic_stream_update; +OSSL_FUNC_cipher_final_fn cipher_generic_stream_final; +OSSL_FUNC_cipher_cipher_fn cipher_generic_cipher; +OSSL_FUNC_cipher_get_ctx_params_fn cipher_generic_get_ctx_params; +OSSL_FUNC_cipher_set_ctx_params_fn cipher_generic_set_ctx_params; +OSSL_FUNC_cipher_gettable_params_fn cipher_generic_gettable_params; +OSSL_FUNC_cipher_gettable_ctx_params_fn cipher_generic_gettable_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn cipher_generic_settable_ctx_params; +OSSL_FUNC_cipher_set_ctx_params_fn cipher_var_keylen_set_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn cipher_var_keylen_settable_ctx_params; +OSSL_FUNC_cipher_gettable_ctx_params_fn cipher_aead_gettable_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn cipher_aead_settable_ctx_params; int cipher_generic_get_params(OSSL_PARAM params[], unsigned int md, unsigned long flags, size_t kbits, size_t blkbits, size_t ivbits); @@ -151,13 +151,13 @@ const OSSL_DISPATCH alg##kbits##lcmode##_functions[] = { \ #define IMPLEMENT_generic_cipher_genfn(alg, UCALG, lcmode, UCMODE, flags, \ kbits, blkbits, ivbits, typ) \ -static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lcmode##_get_params; \ static int alg##_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \ kbits, blkbits, ivbits); \ } \ -static OSSL_OP_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_##lcmode##_newctx; \ static void * alg##_##kbits##_##lcmode##_newctx(void *provctx) \ { \ PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ |