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/digests | |
parent | 23c48d94d4d34eedc15fa65e0fa0e38a6137e09f (diff) | |
download | openssl-new-363b1e5daea4a01889e6ff27148018be63d33b9b.tar.gz |
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/digests')
-rw-r--r-- | providers/implementations/digests/blake2_prov.c | 4 | ||||
-rw-r--r-- | providers/implementations/digests/md5_sha1_prov.c | 4 | ||||
-rw-r--r-- | providers/implementations/digests/mdc2_prov.c | 4 | ||||
-rw-r--r-- | providers/implementations/digests/sha2_prov.c | 4 | ||||
-rw-r--r-- | providers/implementations/digests/sha3_prov.c | 18 |
5 files changed, 17 insertions, 17 deletions
diff --git a/providers/implementations/digests/blake2_prov.c b/providers/implementations/digests/blake2_prov.c index 1fe7cb18fc..b2462bc477 100644 --- a/providers/implementations/digests/blake2_prov.c +++ b/providers/implementations/digests/blake2_prov.c @@ -12,8 +12,8 @@ #include "prov/digestcommon.h" #include "prov/implementations.h" -OSSL_OP_digest_init_fn blake2s256_init; -OSSL_OP_digest_init_fn blake2b512_init; +OSSL_FUNC_digest_init_fn blake2s256_init; +OSSL_FUNC_digest_init_fn blake2b512_init; int blake2s256_init(void *ctx) { diff --git a/providers/implementations/digests/md5_sha1_prov.c b/providers/implementations/digests/md5_sha1_prov.c index 07e4bf41bf..c5dc4a36ce 100644 --- a/providers/implementations/digests/md5_sha1_prov.c +++ b/providers/implementations/digests/md5_sha1_prov.c @@ -22,8 +22,8 @@ #include "prov/digestcommon.h" #include "prov/implementations.h" -static OSSL_OP_digest_set_ctx_params_fn md5_sha1_set_ctx_params; -static OSSL_OP_digest_settable_ctx_params_fn md5_sha1_settable_ctx_params; +static OSSL_FUNC_digest_set_ctx_params_fn md5_sha1_set_ctx_params; +static OSSL_FUNC_digest_settable_ctx_params_fn md5_sha1_settable_ctx_params; static const OSSL_PARAM known_md5_sha1_settable_ctx_params[] = { {OSSL_DIGEST_PARAM_SSL3_MS, OSSL_PARAM_OCTET_STRING, NULL, 0, 0}, diff --git a/providers/implementations/digests/mdc2_prov.c b/providers/implementations/digests/mdc2_prov.c index a17ad462a8..51958f7cf7 100644 --- a/providers/implementations/digests/mdc2_prov.c +++ b/providers/implementations/digests/mdc2_prov.c @@ -22,8 +22,8 @@ #include "prov/implementations.h" #include "prov/providercommonerr.h" -static OSSL_OP_digest_set_ctx_params_fn mdc2_set_ctx_params; -static OSSL_OP_digest_settable_ctx_params_fn mdc2_settable_ctx_params; +static OSSL_FUNC_digest_set_ctx_params_fn mdc2_set_ctx_params; +static OSSL_FUNC_digest_settable_ctx_params_fn mdc2_settable_ctx_params; static const OSSL_PARAM known_mdc2_settable_ctx_params[] = { OSSL_PARAM_uint(OSSL_DIGEST_PARAM_PAD_TYPE, NULL), diff --git a/providers/implementations/digests/sha2_prov.c b/providers/implementations/digests/sha2_prov.c index 4cabd323de..5a73940b87 100644 --- a/providers/implementations/digests/sha2_prov.c +++ b/providers/implementations/digests/sha2_prov.c @@ -24,8 +24,8 @@ #include "prov/implementations.h" #include "crypto/sha.h" -static OSSL_OP_digest_set_ctx_params_fn sha1_set_ctx_params; -static OSSL_OP_digest_settable_ctx_params_fn sha1_settable_ctx_params; +static OSSL_FUNC_digest_set_ctx_params_fn sha1_set_ctx_params; +static OSSL_FUNC_digest_settable_ctx_params_fn sha1_settable_ctx_params; static const OSSL_PARAM known_sha1_settable_ctx_params[] = { {OSSL_DIGEST_PARAM_SSL3_MS, OSSL_PARAM_OCTET_STRING, NULL, 0, 0}, diff --git a/providers/implementations/digests/sha3_prov.c b/providers/implementations/digests/sha3_prov.c index 848963c418..d7c7e8e44b 100644 --- a/providers/implementations/digests/sha3_prov.c +++ b/providers/implementations/digests/sha3_prov.c @@ -23,13 +23,13 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_digest_init_fn keccak_init; -static OSSL_OP_digest_update_fn keccak_update; -static OSSL_OP_digest_final_fn keccak_final; -static OSSL_OP_digest_freectx_fn keccak_freectx; -static OSSL_OP_digest_dupctx_fn keccak_dupctx; -static OSSL_OP_digest_set_ctx_params_fn shake_set_ctx_params; -static OSSL_OP_digest_settable_ctx_params_fn shake_settable_ctx_params; +static OSSL_FUNC_digest_init_fn keccak_init; +static OSSL_FUNC_digest_update_fn keccak_update; +static OSSL_FUNC_digest_final_fn keccak_final; +static OSSL_FUNC_digest_freectx_fn keccak_freectx; +static OSSL_FUNC_digest_dupctx_fn keccak_dupctx; +static OSSL_FUNC_digest_set_ctx_params_fn shake_set_ctx_params; +static OSSL_FUNC_digest_settable_ctx_params_fn shake_settable_ctx_params; static sha3_absorb_fn generic_sha3_absorb; static sha3_final_fn generic_sha3_final; @@ -182,7 +182,7 @@ static PROV_SHA3_METHOD shake_s390x_md = #endif /* S390_SHA3 */ #define SHA3_newctx(typ, uname, name, bitlen, pad) \ -static OSSL_OP_digest_newctx_fn name##_newctx; \ +static OSSL_FUNC_digest_newctx_fn name##_newctx; \ static void *name##_newctx(void *provctx) \ { \ KECCAK1600_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ @@ -195,7 +195,7 @@ static void *name##_newctx(void *provctx) \ } #define KMAC_newctx(uname, bitlen, pad) \ -static OSSL_OP_digest_newctx_fn uname##_newctx; \ +static OSSL_FUNC_digest_newctx_fn uname##_newctx; \ static void *uname##_newctx(void *provctx) \ { \ KECCAK1600_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ |