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 | |
parent | 23c48d94d4d34eedc15fa65e0fa0e38a6137e09f (diff) | |
download | openssl-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')
101 files changed, 992 insertions, 992 deletions
diff --git a/providers/common/bio_prov.c b/providers/common/bio_prov.c index 2186894b11..c193658c58 100644 --- a/providers/common/bio_prov.c +++ b/providers/common/bio_prov.c @@ -12,12 +12,12 @@ #include "internal/cryptlib.h" #include "prov/bio.h" -static OSSL_BIO_new_file_fn *c_bio_new_file = NULL; -static OSSL_BIO_new_membuf_fn *c_bio_new_membuf = NULL; -static OSSL_BIO_read_ex_fn *c_bio_read_ex = NULL; -static OSSL_BIO_write_ex_fn *c_bio_write_ex = NULL; -static OSSL_BIO_free_fn *c_bio_free = NULL; -static OSSL_BIO_vprintf_fn *c_bio_vprintf = NULL; +static OSSL_FUNC_BIO_new_file_fn *c_bio_new_file = NULL; +static OSSL_FUNC_BIO_new_membuf_fn *c_bio_new_membuf = NULL; +static OSSL_FUNC_BIO_read_ex_fn *c_bio_read_ex = NULL; +static OSSL_FUNC_BIO_write_ex_fn *c_bio_write_ex = NULL; +static OSSL_FUNC_BIO_free_fn *c_bio_free = NULL; +static OSSL_FUNC_BIO_vprintf_fn *c_bio_vprintf = NULL; int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns) { @@ -25,27 +25,27 @@ int ossl_prov_bio_from_dispatch(const OSSL_DISPATCH *fns) switch (fns->function_id) { case OSSL_FUNC_BIO_NEW_FILE: if (c_bio_new_file == NULL) - c_bio_new_file = OSSL_get_BIO_new_file(fns); + c_bio_new_file = OSSL_FUNC_BIO_new_file(fns); break; case OSSL_FUNC_BIO_NEW_MEMBUF: if (c_bio_new_membuf == NULL) - c_bio_new_membuf = OSSL_get_BIO_new_membuf(fns); + c_bio_new_membuf = OSSL_FUNC_BIO_new_membuf(fns); break; case OSSL_FUNC_BIO_READ_EX: if (c_bio_read_ex == NULL) - c_bio_read_ex = OSSL_get_BIO_read_ex(fns); + c_bio_read_ex = OSSL_FUNC_BIO_read_ex(fns); break; case OSSL_FUNC_BIO_WRITE_EX: if (c_bio_write_ex == NULL) - c_bio_write_ex = OSSL_get_BIO_write_ex(fns); + c_bio_write_ex = OSSL_FUNC_BIO_write_ex(fns); break; case OSSL_FUNC_BIO_FREE: if (c_bio_free == NULL) - c_bio_free = OSSL_get_BIO_free(fns); + c_bio_free = OSSL_FUNC_BIO_free(fns); break; case OSSL_FUNC_BIO_VPRINTF: if (c_bio_vprintf == NULL) - c_bio_vprintf = OSSL_get_BIO_vprintf(fns); + c_bio_vprintf = OSSL_FUNC_BIO_vprintf(fns); break; } } diff --git a/providers/common/include/prov/providercommon.h b/providers/common/include/prov/providercommon.h index 2a614f5d81..f39d2e313f 100644 --- a/providers/common/include/prov/providercommon.h +++ b/providers/common/include/prov/providercommon.h @@ -17,4 +17,4 @@ const char *ossl_prov_util_nid_to_name(int nid); int cipher_capable_aes_cbc_hmac_sha1(void); int cipher_capable_aes_cbc_hmac_sha256(void); -OSSL_provider_get_capabilities_fn provider_get_capabilities; +OSSL_FUNC_provider_get_capabilities_fn provider_get_capabilities; diff --git a/providers/defltprov.c b/providers/defltprov.c index 1ea3604377..c92736e547 100644 --- a/providers/defltprov.c +++ b/providers/defltprov.c @@ -25,16 +25,16 @@ * Forward declarations to ensure that interface functions are correctly * defined. */ -static OSSL_provider_gettable_params_fn deflt_gettable_params; -static OSSL_provider_get_params_fn deflt_get_params; -static OSSL_provider_query_operation_fn deflt_query; +static OSSL_FUNC_provider_gettable_params_fn deflt_gettable_params; +static OSSL_FUNC_provider_get_params_fn deflt_get_params; +static OSSL_FUNC_provider_query_operation_fn deflt_query; #define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=default", FUNC }, CHECK } #define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL) /* 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 deflt_param_types[] = { @@ -584,7 +584,7 @@ int ossl_default_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; BIO_METHOD *corebiometh; if (!ossl_prov_bio_from_dispatch(in)) @@ -592,13 +592,13 @@ int ossl_default_provider_init(const OSSL_CORE_HANDLE *handle, 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; default: /* Just ignore anything we don't understand */ diff --git a/providers/fips/fipsprov.c b/providers/fips/fipsprov.c index d847d5c903..f7289ad75e 100644 --- a/providers/fips/fipsprov.c +++ b/providers/fips/fipsprov.c @@ -38,15 +38,15 @@ * Forward declarations to ensure that interface functions are correctly * defined. */ -static OSSL_provider_teardown_fn fips_teardown; -static OSSL_provider_gettable_params_fn fips_gettable_params; -static OSSL_provider_get_params_fn fips_get_params; -static OSSL_provider_query_operation_fn fips_query; +static OSSL_FUNC_provider_teardown_fn fips_teardown; +static OSSL_FUNC_provider_gettable_params_fn fips_gettable_params; +static OSSL_FUNC_provider_get_params_fn fips_get_params; +static OSSL_FUNC_provider_query_operation_fn fips_query; #define ALGC(NAMES, FUNC, CHECK) { { NAMES, "provider=fips,fips=yes", FUNC }, CHECK } #define ALG(NAMES, FUNC) ALGC(NAMES, FUNC, NULL) -extern OSSL_core_thread_start_fn *c_thread_start; +extern OSSL_FUNC_core_thread_start_fn *c_thread_start; /* * TODO(3.0): Should these be stored in the provider side provctx? Could they @@ -58,27 +58,27 @@ extern OSSL_core_thread_start_fn *c_thread_start; static SELF_TEST_POST_PARAMS selftest_params; /* Functions provided by the core */ -static OSSL_core_gettable_params_fn *c_gettable_params; -static OSSL_core_get_params_fn *c_get_params; -OSSL_core_thread_start_fn *c_thread_start; -static OSSL_core_new_error_fn *c_new_error; -static OSSL_core_set_error_debug_fn *c_set_error_debug; -static OSSL_core_vset_error_fn *c_vset_error; -static OSSL_core_set_error_mark_fn *c_set_error_mark; -static OSSL_core_clear_last_error_mark_fn *c_clear_last_error_mark; -static OSSL_core_pop_error_to_mark_fn *c_pop_error_to_mark; -static OSSL_CRYPTO_malloc_fn *c_CRYPTO_malloc; -static OSSL_CRYPTO_zalloc_fn *c_CRYPTO_zalloc; -static OSSL_CRYPTO_free_fn *c_CRYPTO_free; -static OSSL_CRYPTO_clear_free_fn *c_CRYPTO_clear_free; -static OSSL_CRYPTO_realloc_fn *c_CRYPTO_realloc; -static OSSL_CRYPTO_clear_realloc_fn *c_CRYPTO_clear_realloc; -static OSSL_CRYPTO_secure_malloc_fn *c_CRYPTO_secure_malloc; -static OSSL_CRYPTO_secure_zalloc_fn *c_CRYPTO_secure_zalloc; -static OSSL_CRYPTO_secure_free_fn *c_CRYPTO_secure_free; -static OSSL_CRYPTO_secure_clear_free_fn *c_CRYPTO_secure_clear_free; -static OSSL_CRYPTO_secure_allocated_fn *c_CRYPTO_secure_allocated; -static OSSL_BIO_vsnprintf_fn *c_BIO_vsnprintf; +static OSSL_FUNC_core_gettable_params_fn *c_gettable_params; +static OSSL_FUNC_core_get_params_fn *c_get_params; +OSSL_FUNC_core_thread_start_fn *c_thread_start; +static OSSL_FUNC_core_new_error_fn *c_new_error; +static OSSL_FUNC_core_set_error_debug_fn *c_set_error_debug; +static OSSL_FUNC_core_vset_error_fn *c_vset_error; +static OSSL_FUNC_core_set_error_mark_fn *c_set_error_mark; +static OSSL_FUNC_core_clear_last_error_mark_fn *c_clear_last_error_mark; +static OSSL_FUNC_core_pop_error_to_mark_fn *c_pop_error_to_mark; +static OSSL_FUNC_CRYPTO_malloc_fn *c_CRYPTO_malloc; +static OSSL_FUNC_CRYPTO_zalloc_fn *c_CRYPTO_zalloc; +static OSSL_FUNC_CRYPTO_free_fn *c_CRYPTO_free; +static OSSL_FUNC_CRYPTO_clear_free_fn *c_CRYPTO_clear_free; +static OSSL_FUNC_CRYPTO_realloc_fn *c_CRYPTO_realloc; +static OSSL_FUNC_CRYPTO_clear_realloc_fn *c_CRYPTO_clear_realloc; +static OSSL_FUNC_CRYPTO_secure_malloc_fn *c_CRYPTO_secure_malloc; +static OSSL_FUNC_CRYPTO_secure_zalloc_fn *c_CRYPTO_secure_zalloc; +static OSSL_FUNC_CRYPTO_secure_free_fn *c_CRYPTO_secure_free; +static OSSL_FUNC_CRYPTO_secure_clear_free_fn *c_CRYPTO_secure_clear_free; +static OSSL_FUNC_CRYPTO_secure_allocated_fn *c_CRYPTO_secure_allocated; +static OSSL_FUNC_BIO_vsnprintf_fn *c_BIO_vsnprintf; typedef struct fips_global_st { const OSSL_CORE_HANDLE *handle; @@ -595,91 +595,91 @@ int OSSL_provider_init(const OSSL_CORE_HANDLE *handle, { FIPS_GLOBAL *fgbl; OPENSSL_CTX *libctx = NULL; - OSSL_self_test_cb_fn *stcbfn = NULL; - OSSL_core_get_library_context_fn *c_get_libctx = NULL; + OSSL_FUNC_self_test_cb_fn *stcbfn = NULL; + OSSL_FUNC_core_get_library_context_fn *c_get_libctx = NULL; for (; in->function_id != 0; in++) { switch (in->function_id) { 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; 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_THREAD_START: - c_thread_start = OSSL_get_core_thread_start(in); + c_thread_start = OSSL_FUNC_core_thread_start(in); break; case OSSL_FUNC_CORE_NEW_ERROR: - c_new_error = OSSL_get_core_new_error(in); + c_new_error = OSSL_FUNC_core_new_error(in); break; case OSSL_FUNC_CORE_SET_ERROR_DEBUG: - c_set_error_debug = OSSL_get_core_set_error_debug(in); + c_set_error_debug = OSSL_FUNC_core_set_error_debug(in); break; case OSSL_FUNC_CORE_VSET_ERROR: - c_vset_error = OSSL_get_core_vset_error(in); + c_vset_error = OSSL_FUNC_core_vset_error(in); break; case OSSL_FUNC_CORE_SET_ERROR_MARK: - c_set_error_mark = OSSL_get_core_set_error_mark(in); + c_set_error_mark = OSSL_FUNC_core_set_error_mark(in); break; case OSSL_FUNC_CORE_CLEAR_LAST_ERROR_MARK: - c_clear_last_error_mark = OSSL_get_core_clear_last_error_mark(in); + c_clear_last_error_mark = OSSL_FUNC_core_clear_last_error_mark(in); break; case OSSL_FUNC_CORE_POP_ERROR_TO_MARK: - c_pop_error_to_mark = OSSL_get_core_pop_error_to_mark(in); + c_pop_error_to_mark = OSSL_FUNC_core_pop_error_to_mark(in); break; case OSSL_FUNC_CRYPTO_MALLOC: - c_CRYPTO_malloc = OSSL_get_CRYPTO_malloc(in); + c_CRYPTO_malloc = OSSL_FUNC_CRYPTO_malloc(in); break; case OSSL_FUNC_CRYPTO_ZALLOC: - c_CRYPTO_zalloc = OSSL_get_CRYPTO_zalloc(in); + c_CRYPTO_zalloc = OSSL_FUNC_CRYPTO_zalloc(in); break; case OSSL_FUNC_CRYPTO_FREE: - c_CRYPTO_free = OSSL_get_CRYPTO_free(in); + c_CRYPTO_free = OSSL_FUNC_CRYPTO_free(in); break; case OSSL_FUNC_CRYPTO_CLEAR_FREE: - c_CRYPTO_clear_free = OSSL_get_CRYPTO_clear_free(in); + c_CRYPTO_clear_free = OSSL_FUNC_CRYPTO_clear_free(in); break; case OSSL_FUNC_CRYPTO_REALLOC: - c_CRYPTO_realloc = OSSL_get_CRYPTO_realloc(in); + c_CRYPTO_realloc = OSSL_FUNC_CRYPTO_realloc(in); break; case OSSL_FUNC_CRYPTO_CLEAR_REALLOC: - c_CRYPTO_clear_realloc = OSSL_get_CRYPTO_clear_realloc(in); + c_CRYPTO_clear_realloc = OSSL_FUNC_CRYPTO_clear_realloc(in); break; case OSSL_FUNC_CRYPTO_SECURE_MALLOC: - c_CRYPTO_secure_malloc = OSSL_get_CRYPTO_secure_malloc(in); + c_CRYPTO_secure_malloc = OSSL_FUNC_CRYPTO_secure_malloc(in); break; case OSSL_FUNC_CRYPTO_SECURE_ZALLOC: - c_CRYPTO_secure_zalloc = OSSL_get_CRYPTO_secure_zalloc(in); + c_CRYPTO_secure_zalloc = OSSL_FUNC_CRYPTO_secure_zalloc(in); break; case OSSL_FUNC_CRYPTO_SECURE_FREE: - c_CRYPTO_secure_free = OSSL_get_CRYPTO_secure_free(in); + c_CRYPTO_secure_free = OSSL_FUNC_CRYPTO_secure_free(in); break; case OSSL_FUNC_CRYPTO_SECURE_CLEAR_FREE: - c_CRYPTO_secure_clear_free = OSSL_get_CRYPTO_secure_clear_free(in); + c_CRYPTO_secure_clear_free = OSSL_FUNC_CRYPTO_secure_clear_free(in); break; case OSSL_FUNC_CRYPTO_SECURE_ALLOCATED: - c_CRYPTO_secure_allocated = OSSL_get_CRYPTO_secure_allocated(in); + c_CRYPTO_secure_allocated = OSSL_FUNC_CRYPTO_secure_allocated(in); break; case OSSL_FUNC_BIO_NEW_FILE: - selftest_params.bio_new_file_cb = OSSL_get_BIO_new_file(in); + selftest_params.bio_new_file_cb = OSSL_FUNC_BIO_new_file(in); break; case OSSL_FUNC_BIO_NEW_MEMBUF: - selftest_params.bio_new_buffer_cb = OSSL_get_BIO_new_membuf(in); + selftest_params.bio_new_buffer_cb = OSSL_FUNC_BIO_new_membuf(in); break; case OSSL_FUNC_BIO_READ_EX: - selftest_params.bio_read_ex_cb = OSSL_get_BIO_read_ex(in); + selftest_params.bio_read_ex_cb = OSSL_FUNC_BIO_read_ex(in); break; case OSSL_FUNC_BIO_FREE: - selftest_params.bio_free_cb = OSSL_get_BIO_free(in); + selftest_params.bio_free_cb = OSSL_FUNC_BIO_free(in); break; case OSSL_FUNC_BIO_VSNPRINTF: - c_BIO_vsnprintf = OSSL_get_BIO_vsnprintf(in); + c_BIO_vsnprintf = OSSL_FUNC_BIO_vsnprintf(in); break; case OSSL_FUNC_SELF_TEST_CB: { - stcbfn = OSSL_get_self_test_cb(in); + stcbfn = OSSL_FUNC_self_test_cb(in); break; } default: @@ -753,12 +753,12 @@ int fips_intern_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; for (; in->function_id != 0; in++) { switch (in->function_id) { 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; default: break; diff --git a/providers/fips/self_test.c b/providers/fips/self_test.c index c482544346..d58226f81e 100644 --- a/providers/fips/self_test.c +++ b/providers/fips/self_test.c @@ -130,7 +130,7 @@ DEP_FINI_ATTRIBUTE void cleanup(void) * the result matches the expected value. * Return 1 if verified, or 0 if it fails. */ -static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_BIO_read_ex_fn read_ex_cb, +static int verify_integrity(OSSL_CORE_BIO *bio, OSSL_FUNC_BIO_read_ex_fn read_ex_cb, unsigned char *expected, size_t expected_len, OPENSSL_CTX *libctx, OSSL_SELF_TEST *ev, const char *event_type) diff --git a/providers/fips/self_test.h b/providers/fips/self_test.h index 77ef6314ef..20f8a12472 100644 --- a/providers/fips/self_test.h +++ b/providers/fips/self_test.h @@ -22,10 +22,10 @@ typedef struct self_test_post_params_st { const char *indicator_checksum_data; /* Expected MAC integrity value */ /* BIO callbacks supplied to the FIPS provider */ - OSSL_BIO_new_file_fn *bio_new_file_cb; - OSSL_BIO_new_membuf_fn *bio_new_buffer_cb; - OSSL_BIO_read_ex_fn *bio_read_ex_cb; - OSSL_BIO_free_fn *bio_free_cb; + OSSL_FUNC_BIO_new_file_fn *bio_new_file_cb; + OSSL_FUNC_BIO_new_membuf_fn *bio_new_buffer_cb; + OSSL_FUNC_BIO_read_ex_fn *bio_read_ex_cb; + OSSL_FUNC_BIO_free_fn *bio_free_cb; OSSL_CALLBACK *cb; void *cb_arg; OPENSSL_CTX *libctx; diff --git a/providers/implementations/asymciphers/rsa_enc.c b/providers/implementations/asymciphers/rsa_enc.c index 86d4b878fa..8a5cd5cdc3 100644 --- a/providers/implementations/asymciphers/rsa_enc.c +++ b/providers/implementations/asymciphers/rsa_enc.c @@ -31,17 +31,17 @@ #include <stdlib.h> -static OSSL_OP_asym_cipher_newctx_fn rsa_newctx; -static OSSL_OP_asym_cipher_encrypt_init_fn rsa_init; -static OSSL_OP_asym_cipher_encrypt_fn rsa_encrypt; -static OSSL_OP_asym_cipher_decrypt_init_fn rsa_init; -static OSSL_OP_asym_cipher_decrypt_fn rsa_decrypt; -static OSSL_OP_asym_cipher_freectx_fn rsa_freectx; -static OSSL_OP_asym_cipher_dupctx_fn rsa_dupctx; -static OSSL_OP_asym_cipher_get_ctx_params_fn rsa_get_ctx_params; -static OSSL_OP_asym_cipher_gettable_ctx_params_fn rsa_gettable_ctx_params; -static OSSL_OP_asym_cipher_set_ctx_params_fn rsa_set_ctx_params; -static OSSL_OP_asym_cipher_settable_ctx_params_fn rsa_settable_ctx_params; +static OSSL_FUNC_asym_cipher_newctx_fn rsa_newctx; +static OSSL_FUNC_asym_cipher_encrypt_init_fn rsa_init; +static OSSL_FUNC_asym_cipher_encrypt_fn rsa_encrypt; +static OSSL_FUNC_asym_cipher_decrypt_init_fn rsa_init; +static OSSL_FUNC_asym_cipher_decrypt_fn rsa_decrypt; +static OSSL_FUNC_asym_cipher_freectx_fn rsa_freectx; +static OSSL_FUNC_asym_cipher_dupctx_fn rsa_dupctx; +static OSSL_FUNC_asym_cipher_get_ctx_params_fn rsa_get_ctx_params; +static OSSL_FUNC_asym_cipher_gettable_ctx_params_fn rsa_gettable_ctx_params; +static OSSL_FUNC_asym_cipher_set_ctx_params_fn rsa_set_ctx_params; +static OSSL_FUNC_asym_cipher_settable_ctx_params_fn rsa_settable_ctx_params; static OSSL_ITEM padding_item[] = { { RSA_PKCS1_PADDING, OSSL_PKEY_RSA_PAD_MODE_PKCSV15 }, diff --git a/providers/implementations/ciphers/cipher_aes.c b/providers/implementations/ciphers/cipher_aes.c index 280dd8156f..ea23e1eed9 100644 --- a/providers/implementations/ciphers/cipher_aes.c +++ b/providers/implementations/ciphers/cipher_aes.c @@ -19,8 +19,8 @@ #include "cipher_aes.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn aes_freectx; -static OSSL_OP_cipher_dupctx_fn aes_dupctx; +static OSSL_FUNC_cipher_freectx_fn aes_freectx; +static OSSL_FUNC_cipher_dupctx_fn aes_dupctx; static void aes_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c index ece4341a3f..d684914c5a 100644 --- a/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c +++ b/providers/implementations/ciphers/cipher_aes_cbc_hmac_sha.c @@ -33,12 +33,12 @@ const OSSL_DISPATCH nm##kbits##sub##_functions[] = { \ | EVP_CIPH_FLAG_AEAD_CIPHER \ | EVP_CIPH_FLAG_TLS1_1_MULTIBLOCK) -static OSSL_OP_cipher_freectx_fn aes_cbc_hmac_sha1_freectx; -static OSSL_OP_cipher_freectx_fn aes_cbc_hmac_sha256_freectx; -static OSSL_OP_cipher_get_ctx_params_fn aes_get_ctx_params; -static OSSL_OP_cipher_gettable_ctx_params_fn aes_gettable_ctx_params; -static OSSL_OP_cipher_set_ctx_params_fn aes_set_ctx_params; -static OSSL_OP_cipher_settable_ctx_params_fn aes_settable_ctx_params; +static OSSL_FUNC_cipher_freectx_fn aes_cbc_hmac_sha1_freectx; +static OSSL_FUNC_cipher_freectx_fn aes_cbc_hmac_sha256_freectx; +static OSSL_FUNC_cipher_get_ctx_params_fn aes_get_ctx_params; +static OSSL_FUNC_cipher_gettable_ctx_params_fn aes_gettable_ctx_params; +static OSSL_FUNC_cipher_set_ctx_params_fn aes_set_ctx_params; +static OSSL_FUNC_cipher_settable_ctx_params_fn aes_settable_ctx_params; # define aes_gettable_params cipher_generic_gettable_params # define aes_einit cipher_generic_einit # define aes_dinit cipher_generic_dinit @@ -308,13 +308,13 @@ static void aes_cbc_hmac_sha256_freectx(void *vctx) OPENSSL_clear_free(ctx, sizeof(*ctx)); } -# define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \ -static OSSL_OP_cipher_newctx_fn nm##_##kbits##_##sub##_newctx; \ +# define IMPLEMENT_CIPHER(nm, sub, kbits, blkbits, ivbits, flags) \ +static OSSL_FUNC_cipher_newctx_fn nm##_##kbits##_##sub##_newctx; \ static void *nm##_##kbits##_##sub##_newctx(void *provctx) \ { \ return nm##_##sub##_newctx(provctx, kbits, blkbits, ivbits, flags); \ } \ -static OSSL_OP_cipher_get_params_fn nm##_##kbits##_##sub##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn nm##_##kbits##_##sub##_get_params; \ static int nm##_##kbits##_##sub##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_CBC_MODE, \ diff --git a/providers/implementations/ciphers/cipher_aes_ccm.c b/providers/implementations/ciphers/cipher_aes_ccm.c index f8415e6c93..ae32e34d25 100644 --- a/providers/implementations/ciphers/cipher_aes_ccm.c +++ b/providers/implementations/ciphers/cipher_aes_ccm.c @@ -28,7 +28,7 @@ static void *aes_ccm_newctx(void *provctx, size_t keybits) return ctx; } -static OSSL_OP_cipher_freectx_fn aes_ccm_freectx; +static OSSL_FUNC_cipher_freectx_fn aes_ccm_freectx; static void aes_ccm_freectx(void *vctx) { PROV_AES_CCM_CTX *ctx = (PROV_AES_CCM_CTX *)vctx; diff --git a/providers/implementations/ciphers/cipher_aes_gcm.c b/providers/implementations/ciphers/cipher_aes_gcm.c index 440fc00e67..92a0ad1795 100644 --- a/providers/implementations/ciphers/cipher_aes_gcm.c +++ b/providers/implementations/ciphers/cipher_aes_gcm.c @@ -28,7 +28,7 @@ static void *aes_gcm_newctx(void *provctx, size_t keybits) return ctx; } -static OSSL_OP_cipher_freectx_fn aes_gcm_freectx; +static OSSL_FUNC_cipher_freectx_fn aes_gcm_freectx; static void aes_gcm_freectx(void *vctx) { PROV_AES_GCM_CTX *ctx = (PROV_AES_GCM_CTX *)vctx; diff --git a/providers/implementations/ciphers/cipher_aes_ocb.c b/providers/implementations/ciphers/cipher_aes_ocb.c index 84ba062d6b..09c38b7ef4 100644 --- a/providers/implementations/ciphers/cipher_aes_ocb.c +++ b/providers/implementations/ciphers/cipher_aes_ocb.c @@ -30,15 +30,15 @@ PROV_CIPHER_FUNC(int, ocb_cipher, (PROV_AES_OCB_CTX *ctx, const unsigned char *in, unsigned char *out, size_t nextblock)); /* forward declarations */ -static OSSL_OP_cipher_encrypt_init_fn aes_ocb_einit; -static OSSL_OP_cipher_decrypt_init_fn aes_ocb_dinit; -static OSSL_OP_cipher_update_fn aes_ocb_block_update; -static OSSL_OP_cipher_final_fn aes_ocb_block_final; -static OSSL_OP_cipher_cipher_fn aes_ocb_cipher; -static OSSL_OP_cipher_freectx_fn aes_ocb_freectx; -static OSSL_OP_cipher_dupctx_fn aes_ocb_dupctx; -static OSSL_OP_cipher_get_ctx_params_fn aes_ocb_get_ctx_params; -static OSSL_OP_cipher_set_ctx_params_fn aes_ocb_set_ctx_params; +static OSSL_FUNC_cipher_encrypt_init_fn aes_ocb_einit; +static OSSL_FUNC_cipher_decrypt_init_fn aes_ocb_dinit; +static OSSL_FUNC_cipher_update_fn aes_ocb_block_update; +static OSSL_FUNC_cipher_final_fn aes_ocb_block_final; +static OSSL_FUNC_cipher_cipher_fn aes_ocb_cipher; +static OSSL_FUNC_cipher_freectx_fn aes_ocb_freectx; +static OSSL_FUNC_cipher_dupctx_fn aes_ocb_dupctx; +static OSSL_FUNC_cipher_get_ctx_params_fn aes_ocb_get_ctx_params; +static OSSL_FUNC_cipher_set_ctx_params_fn aes_ocb_set_ctx_params; /* * The following methods could be moved into PROV_AES_OCB_HW if @@ -470,13 +470,13 @@ static int aes_ocb_cipher(void *vctx, unsigned char *out, size_t *outl, } #define IMPLEMENT_cipher(mode, UCMODE, flags, kbits, blkbits, ivbits) \ -static OSSL_OP_cipher_get_params_fn aes_##kbits##_##mode##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##mode##_get_params; \ static int aes_##kbits##_##mode##_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 aes_##kbits##_##mode##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_##mode##_newctx; \ static void *aes_##kbits##_##mode##_newctx(void *provctx) \ { \ return aes_##mode##_newctx(provctx, kbits, blkbits, ivbits, \ diff --git a/providers/implementations/ciphers/cipher_aes_siv.c b/providers/implementations/ciphers/cipher_aes_siv.c index 8624378033..48bf01649a 100644 --- a/providers/implementations/ciphers/cipher_aes_siv.c +++ b/providers/implementations/ciphers/cipher_aes_siv.c @@ -204,13 +204,13 @@ static const OSSL_PARAM *aes_siv_settable_ctx_params(void) } #define IMPLEMENT_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ -static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ static int alg##_##kbits##_##lc##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \ flags, 2*kbits, blkbits, ivbits); \ } \ -static OSSL_OP_cipher_newctx_fn alg##kbits##lc##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \ static void * alg##kbits##lc##_newctx(void *provctx) \ { \ return alg##_##lc##_newctx(provctx, 2*kbits, EVP_CIPH_##UCMODE##_MODE, \ diff --git a/providers/implementations/ciphers/cipher_aes_wrp.c b/providers/implementations/ciphers/cipher_aes_wrp.c index b5b8e501be..9782afa137 100644 --- a/providers/implementations/ciphers/cipher_aes_wrp.c +++ b/providers/implementations/ciphers/cipher_aes_wrp.c @@ -29,11 +29,11 @@ typedef size_t (*aeswrap_fn)(void *key, const unsigned char *iv, unsigned char *out, const unsigned char *in, size_t inlen, block128_f block); -static OSSL_OP_cipher_encrypt_init_fn aes_wrap_einit; -static OSSL_OP_cipher_decrypt_init_fn aes_wrap_dinit; -static OSSL_OP_cipher_update_fn aes_wrap_cipher; -static OSSL_OP_cipher_final_fn aes_wrap_final; -static OSSL_OP_cipher_freectx_fn aes_wrap_freectx; +static OSSL_FUNC_cipher_encrypt_init_fn aes_wrap_einit; +static OSSL_FUNC_cipher_decrypt_init_fn aes_wrap_dinit; +static OSSL_FUNC_cipher_update_fn aes_wrap_cipher; +static OSSL_FUNC_cipher_final_fn aes_wrap_final; +static OSSL_FUNC_cipher_freectx_fn aes_wrap_freectx; typedef struct prov_aes_wrap_ctx_st { PROV_CIPHER_CTX base; @@ -209,13 +209,13 @@ static int aes_wrap_set_ctx_params(void *vctx, const OSSL_PARAM params[]) } #define IMPLEMENT_cipher(mode, fname, UCMODE, flags, kbits, blkbits, ivbits) \ - static OSSL_OP_cipher_get_params_fn aes_##kbits##_##fname##_get_params; \ + static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##fname##_get_params; \ static int aes_##kbits##_##fname##_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 aes_##kbits##fname##_newctx; \ + static OSSL_FUNC_cipher_newctx_fn aes_##kbits##fname##_newctx; \ static void *aes_##kbits##fname##_newctx(void *provctx) \ { \ return aes_##mode##_newctx(kbits, blkbits, ivbits, \ diff --git a/providers/implementations/ciphers/cipher_aes_xts.c b/providers/implementations/ciphers/cipher_aes_xts.c index b47f54810d..96e885e2ca 100644 --- a/providers/implementations/ciphers/cipher_aes_xts.c +++ b/providers/implementations/ciphers/cipher_aes_xts.c @@ -28,15 +28,15 @@ #define AES_XTS_BLOCK_BITS 8 /* forward declarations */ -static OSSL_OP_cipher_encrypt_init_fn aes_xts_einit; -static OSSL_OP_cipher_decrypt_init_fn aes_xts_dinit; -static OSSL_OP_cipher_update_fn aes_xts_stream_update; -static OSSL_OP_cipher_final_fn aes_xts_stream_final; -static OSSL_OP_cipher_cipher_fn aes_xts_cipher; -static OSSL_OP_cipher_freectx_fn aes_xts_freectx; -static OSSL_OP_cipher_dupctx_fn aes_xts_dupctx; -static OSSL_OP_cipher_set_ctx_params_fn aes_xts_set_ctx_params; -static OSSL_OP_cipher_settable_ctx_params_fn aes_xts_settable_ctx_params; +static OSSL_FUNC_cipher_encrypt_init_fn aes_xts_einit; +static OSSL_FUNC_cipher_decrypt_init_fn aes_xts_dinit; +static OSSL_FUNC_cipher_update_fn aes_xts_stream_update; +static OSSL_FUNC_cipher_final_fn aes_xts_stream_final; +static OSSL_FUNC_cipher_cipher_fn aes_xts_cipher; +static OSSL_FUNC_cipher_freectx_fn aes_xts_freectx; +static OSSL_FUNC_cipher_dupctx_fn aes_xts_dupctx; +static OSSL_FUNC_cipher_set_ctx_params_fn aes_xts_set_ctx_params; +static OSSL_FUNC_cipher_settable_ctx_params_fn aes_xts_settable_ctx_params; /* * Verify that the two keys are different. @@ -241,14 +241,14 @@ static int aes_xts_set_ctx_params(void *vctx, const OSSL_PARAM params[]) } #define IMPLEMENT_cipher(lcmode, UCMODE, kbits, flags) \ -static OSSL_OP_cipher_get_params_fn aes_##kbits##_##lcmode##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn aes_##kbits##_##lcmode##_get_params; \ static int aes_##kbits##_##lcmode##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, \ flags, 2 * kbits, AES_XTS_BLOCK_BITS, \ AES_XTS_IV_BITS); \ } \ -static OSSL_OP_cipher_newctx_fn aes_##kbits##_xts_newctx; \ +static OSSL_FUNC_cipher_newctx_fn aes_##kbits##_xts_newctx; \ static void *aes_##kbits##_xts_newctx(void *provctx) \ { \ return aes_xts_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, flags, 2 * kbits, \ diff --git a/providers/implementations/ciphers/cipher_aria.c b/providers/implementations/ciphers/cipher_aria.c index 37afa06cb5..dd1ce4af53 100644 --- a/providers/implementations/ciphers/cipher_aria.c +++ b/providers/implementations/ciphers/cipher_aria.c @@ -12,8 +12,8 @@ #include "cipher_aria.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn aria_freectx; -static OSSL_OP_cipher_dupctx_fn aria_dupctx; +static OSSL_FUNC_cipher_freectx_fn aria_freectx; +static OSSL_FUNC_cipher_dupctx_fn aria_dupctx; static void aria_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_aria_ccm.c b/providers/implementations/ciphers/cipher_aria_ccm.c index e4cfc6cd8f..e14d220397 100644 --- a/providers/implementations/ciphers/cipher_aria_ccm.c +++ b/providers/implementations/ciphers/cipher_aria_ccm.c @@ -12,7 +12,7 @@ #include "cipher_aria_ccm.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn aria_ccm_freectx; +static OSSL_FUNC_cipher_freectx_fn aria_ccm_freectx; static void *aria_ccm_newctx(void *provctx, size_t keybits) { diff --git a/providers/implementations/ciphers/cipher_aria_gcm.c b/providers/implementations/ciphers/cipher_aria_gcm.c index 1481fcc2e2..6cf02e4ba0 100644 --- a/providers/implementations/ciphers/cipher_aria_gcm.c +++ b/providers/implementations/ciphers/cipher_aria_gcm.c @@ -21,7 +21,7 @@ static void *aria_gcm_newctx(void *provctx, size_t keybits) return ctx; } -static OSSL_OP_cipher_freectx_fn aria_gcm_freectx; +static OSSL_FUNC_cipher_freectx_fn aria_gcm_freectx; static void aria_gcm_freectx(void *vctx) { PROV_ARIA_GCM_CTX *ctx = (PROV_ARIA_GCM_CTX *)vctx; diff --git a/providers/implementations/ciphers/cipher_blowfish.c b/providers/implementations/ciphers/cipher_blowfish.c index 128e5d769a..bb2fa88f6a 100644 --- a/providers/implementations/ciphers/cipher_blowfish.c +++ b/providers/implementations/ciphers/cipher_blowfish.c @@ -20,8 +20,8 @@ #define BF_FLAGS (EVP_CIPH_VARIABLE_LENGTH) -static OSSL_OP_cipher_freectx_fn blowfish_freectx; -static OSSL_OP_cipher_dupctx_fn blowfish_dupctx; +static OSSL_FUNC_cipher_freectx_fn blowfish_freectx; +static OSSL_FUNC_cipher_dupctx_fn blowfish_dupctx; static void blowfish_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_camellia.c b/providers/implementations/ciphers/cipher_camellia.c index 2151399136..abb24621a6 100644 --- a/providers/implementations/ciphers/cipher_camellia.c +++ b/providers/implementations/ciphers/cipher_camellia.c @@ -18,8 +18,8 @@ #include "cipher_camellia.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn camellia_freectx; -static OSSL_OP_cipher_dupctx_fn camellia_dupctx; +static OSSL_FUNC_cipher_freectx_fn camellia_freectx; +static OSSL_FUNC_cipher_dupctx_fn camellia_dupctx; static void camellia_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_cast5.c b/providers/implementations/ciphers/cipher_cast5.c index 566583d141..febadfb62b 100644 --- a/providers/implementations/ciphers/cipher_cast5.c +++ b/providers/implementations/ciphers/cipher_cast5.c @@ -21,8 +21,8 @@ #define CAST5_FLAGS (EVP_CIPH_VARIABLE_LENGTH) -static OSSL_OP_cipher_freectx_fn cast5_freectx; -static OSSL_OP_cipher_dupctx_fn cast5_dupctx; +static OSSL_FUNC_cipher_freectx_fn cast5_freectx; +static OSSL_FUNC_cipher_dupctx_fn cast5_dupctx; static void cast5_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_chacha20.c b/providers/implementations/ciphers/cipher_chacha20.c index d92fa08d0c..3d51c2a2a3 100644 --- a/providers/implementations/ciphers/cipher_chacha20.c +++ b/providers/implementations/ciphers/cipher_chacha20.c @@ -19,13 +19,13 @@ /* TODO(3.0) Figure out what flags are required */ #define CHACHA20_FLAGS (EVP_CIPH_CUSTOM_IV | EVP_CIPH_ALWAYS_CALL_INIT) -static OSSL_OP_cipher_newctx_fn chacha20_newctx; -static OSSL_OP_cipher_freectx_fn chacha20_freectx; -static OSSL_OP_cipher_get_params_fn chacha20_get_params; -static OSSL_OP_cipher_get_ctx_params_fn chacha20_get_ctx_params; -static OSSL_OP_cipher_set_ctx_params_fn chacha20_set_ctx_params; -static OSSL_OP_cipher_gettable_ctx_params_fn chacha20_gettable_ctx_params; -static OSSL_OP_cipher_settable_ctx_params_fn chacha20_settable_ctx_params; +static OSSL_FUNC_cipher_newctx_fn chacha20_newctx; +static OSSL_FUNC_cipher_freectx_fn chacha20_freectx; +static OSSL_FUNC_cipher_get_params_fn chacha20_get_params; +static OSSL_FUNC_cipher_get_ctx_params_fn chacha20_get_ctx_params; +static OSSL_FUNC_cipher_set_ctx_params_fn chacha20_set_ctx_params; +static OSSL_FUNC_cipher_gettable_ctx_params_fn chacha20_gettable_ctx_params; +static OSSL_FUNC_cipher_settable_ctx_params_fn chacha20_settable_ctx_params; #define chacha20_cipher cipher_generic_cipher #define chacha20_update cipher_generic_stream_update #define chacha20_final cipher_generic_stream_final diff --git a/providers/implementations/ciphers/cipher_chacha20.h b/providers/implementations/ciphers/cipher_chacha20.h index f934c0033f..9dd5909fc7 100644 --- a/providers/implementations/ciphers/cipher_chacha20.h +++ b/providers/implementations/ciphers/cipher_chacha20.h @@ -29,6 +29,6 @@ typedef struct prov_cipher_hw_chacha20_st { const PROV_CIPHER_HW *PROV_CIPHER_HW_chacha20(size_t keybits); -OSSL_OP_cipher_encrypt_init_fn chacha20_einit; -OSSL_OP_cipher_decrypt_init_fn chacha20_dinit; +OSSL_FUNC_cipher_encrypt_init_fn chacha20_einit; +OSSL_FUNC_cipher_decrypt_init_fn chacha20_dinit; void chacha20_initctx(PROV_CHACHA20_CTX *ctx); diff --git a/providers/implementations/ciphers/cipher_chacha20_poly1305.c b/providers/implementations/ciphers/cipher_chacha20_poly1305.c index 6bf88dbd9e..219d9fe394 100644 --- a/providers/implementations/ciphers/cipher_chacha20_poly1305.c +++ b/providers/implementations/ciphers/cipher_chacha20_poly1305.c @@ -27,16 +27,16 @@ | EVP_CIPH_CUSTOM_IV \ | EVP_CIPH_CUSTOM_IV_LENGTH) -static OSSL_OP_cipher_newctx_fn chacha20_poly1305_newctx; -static OSSL_OP_cipher_freectx_fn chacha20_poly1305_freectx; -static OSSL_OP_cipher_encrypt_init_fn chacha20_poly1305_einit; -static OSSL_OP_cipher_decrypt_init_fn chacha20_poly1305_dinit; -static OSSL_OP_cipher_get_params_fn chacha20_poly1305_get_params; -static OSSL_OP_cipher_get_ctx_params_fn chacha20_poly1305_get_ctx_params; -static OSSL_OP_cipher_set_ctx_params_fn chacha20_poly1305_set_ctx_params; -static OSSL_OP_cipher_cipher_fn chacha20_poly1305_cipher; -static OSSL_OP_cipher_final_fn chacha20_poly1305_final; -static OSSL_OP_cipher_gettable_ctx_params_fn chacha20_poly1305_gettable_ctx_params; +static OSSL_FUNC_cipher_newctx_fn chacha20_poly1305_newctx; +static OSSL_FUNC_cipher_freectx_fn chacha20_poly1305_freectx; +static OSSL_FUNC_cipher_encrypt_init_fn chacha20_poly1305_einit; +static OSSL_FUNC_cipher_decrypt_init_fn chacha20_poly1305_dinit; +static OSSL_FUNC_cipher_get_params_fn chacha20_poly1305_get_params; +static OSSL_FUNC_cipher_get_ctx_params_fn chacha20_poly1305_get_ctx_params; +static OSSL_FUNC_cipher_set_ctx_params_fn chacha20_poly1305_set_ctx_params; +static OSSL_FUNC_cipher_cipher_fn chacha20_poly1305_cipher; +static OSSL_FUNC_cipher_final_fn chacha20_poly1305_final; +static OSSL_FUNC_cipher_gettable_ctx_params_fn chacha20_poly1305_gettable_ctx_params; #define chacha20_poly1305_settable_ctx_params cipher_aead_settable_ctx_params #define chacha20_poly1305_gettable_params cipher_generic_gettable_params #define chacha20_poly1305_update chacha20_poly1305_cipher diff --git a/providers/implementations/ciphers/cipher_des.c b/providers/implementations/ciphers/cipher_des.c index 2c0c41cbaf..7a7f16e454 100644 --- a/providers/implementations/ciphers/cipher_des.c +++ b/providers/implementations/ciphers/cipher_des.c @@ -22,11 +22,11 @@ /* TODO(3.0) Figure out what flags need to be here */ #define DES_FLAGS (EVP_CIPH_RAND_KEY) -static OSSL_OP_cipher_freectx_fn des_freectx; -static OSSL_OP_cipher_encrypt_init_fn des_einit; -static OSSL_OP_cipher_decrypt_init_fn des_dinit; -static OSSL_OP_cipher_get_ctx_params_fn des_get_ctx_params; -static OSSL_OP_cipher_gettable_ctx_params_fn des_gettable_ctx_params; +static OSSL_FUNC_cipher_freectx_fn des_freectx; +static OSSL_FUNC_cipher_encrypt_init_fn des_einit; +static OSSL_FUNC_cipher_decrypt_init_fn des_dinit; +static OSSL_FUNC_cipher_get_ctx_params_fn des_get_ctx_params; +static OSSL_FUNC_cipher_gettable_ctx_params_fn des_gettable_ctx_params; static void *des_newctx(void *provctx, size_t kbits, size_t blkbits, size_t ivbits, unsigned int mode, uint64_t flags, @@ -129,14 +129,14 @@ static int des_get_ctx_params(void *vctx, OSSL_PARAM params[]) #define IMPLEMENT_des_cipher(type, lcmode, UCMODE, flags, \ kbits, blkbits, ivbits, block) \ -static OSSL_OP_cipher_newctx_fn type##_##lcmode##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn type##_##lcmode##_newctx; \ static void *des_##lcmode##_newctx(void *provctx) \ { \ return des_newctx(provctx, kbits, blkbits, ivbits, \ EVP_CIPH_##UCMODE##_MODE, flags, \ PROV_CIPHER_HW_des_##lcmode()); \ } \ -static OSSL_OP_cipher_get_params_fn des_##lcmode##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn des_##lcmode##_get_params; \ static int des_##lcmode##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \ diff --git a/providers/implementations/ciphers/cipher_idea.c b/providers/implementations/ciphers/cipher_idea.c index 47909fe9ee..68cca45f92 100644 --- a/providers/implementations/ciphers/cipher_idea.c +++ b/providers/implementations/ciphers/cipher_idea.c @@ -19,8 +19,8 @@ #include "cipher_idea.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn idea_freectx; -static OSSL_OP_cipher_dupctx_fn idea_dupctx; +static OSSL_FUNC_cipher_freectx_fn idea_freectx; +static OSSL_FUNC_cipher_dupctx_fn idea_dupctx; static void idea_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_null.c b/providers/implementations/ciphers/cipher_null.c index 20567279eb..3018a5b075 100644 --- a/providers/implementations/ciphers/cipher_null.c +++ b/providers/implementations/ciphers/cipher_null.c @@ -14,7 +14,7 @@ #include "prov/ciphercommon.h" #include "prov/providercommonerr.h" -static OSSL_OP_cipher_newctx_fn null_newctx; +static OSSL_FUNC_cipher_newctx_fn null_newctx; static void *null_newctx(void *provctx) { static int dummy = 0; @@ -22,19 +22,19 @@ static void *null_newctx(void *provctx) return &dummy; } -static OSSL_OP_cipher_freectx_fn null_freectx; +static OSSL_FUNC_cipher_freectx_fn null_freectx; static void null_freectx(void *vctx) { } -static OSSL_OP_cipher_encrypt_init_fn null_init; +static OSSL_FUNC_cipher_encrypt_init_fn null_init; static int null_init(void *vctx, const unsigned char *key, size_t keylen, const unsigned char *iv, size_t ivlen) { return 1; } -static OSSL_OP_cipher_cipher_fn null_cipher; +static OSSL_FUNC_cipher_cipher_fn null_cipher; static int null_cipher(void *vctx, unsigned char *out, size_t *outl, size_t outsize, const unsigned char *in, size_t inl) { @@ -46,7 +46,7 @@ static int null_cipher(void *vctx, unsigned char *out, size_t *outl, return 1; } -static OSSL_OP_cipher_final_fn null_final; +static OSSL_FUNC_cipher_final_fn null_final; static int null_final(void *vctx, unsigned char *out, size_t *outl, size_t outsize) { @@ -54,7 +54,7 @@ static int null_final(void *vctx, unsigned char *out, size_t *outl, return 1; } -static OSSL_OP_cipher_get_params_fn null_get_params; +static OSSL_FUNC_cipher_get_params_fn null_get_params; static int null_get_params(OSSL_PARAM params[]) { return cipher_generic_get_params(params, 0, 0, 0, 8, 0); @@ -66,13 +66,13 @@ static const OSSL_PARAM null_known_gettable_ctx_params[] = { OSSL_PARAM_END }; -static OSSL_OP_cipher_gettable_ctx_params_fn null_gettable_ctx_params; +static OSSL_FUNC_cipher_gettable_ctx_params_fn null_gettable_ctx_params; static const OSSL_PARAM *null_gettable_ctx_params(void) { return null_known_gettable_ctx_params; } -static OSSL_OP_cipher_get_ctx_params_fn null_get_ctx_params; +static OSSL_FUNC_cipher_get_ctx_params_fn null_get_ctx_params; static int null_get_ctx_params(void *vctx, OSSL_PARAM params[]) { OSSL_PARAM *p; diff --git a/providers/implementations/ciphers/cipher_rc2.c b/providers/implementations/ciphers/cipher_rc2.c index 114b7bfe2c..f2304b7c0f 100644 --- a/providers/implementations/ciphers/cipher_rc2.c +++ b/providers/implementations/ciphers/cipher_rc2.c @@ -23,10 +23,10 @@ #define RC2_64_MAGIC 0x78 #define RC2_128_MAGIC 0x3a -static OSSL_OP_cipher_freectx_fn rc2_freectx; -static OSSL_OP_cipher_dupctx_fn rc2_dupctx; -static OSSL_OP_cipher_gettable_ctx_params_fn rc2_gettable_ctx_params; -static OSSL_OP_cipher_settable_ctx_params_fn rc2_settable_ctx_params; +static OSSL_FUNC_cipher_freectx_fn rc2_freectx; +static OSSL_FUNC_cipher_dupctx_fn rc2_dupctx; +static OSSL_FUNC_cipher_gettable_ctx_params_fn rc2_gettable_ctx_params; +static OSSL_FUNC_cipher_settable_ctx_params_fn rc2_settable_ctx_params; static void rc2_freectx(void *vctx) { @@ -188,13 +188,13 @@ CIPHER_DEFAULT_SETTABLE_CTX_PARAMS_END(rc2) #define IMPLEMENT_cipher(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)); \ diff --git a/providers/implementations/ciphers/cipher_rc4.c b/providers/implementations/ciphers/cipher_rc4.c index 1893462b25..97d66660f0 100644 --- a/providers/implementations/ciphers/cipher_rc4.c +++ b/providers/implementations/ciphers/cipher_rc4.c @@ -21,8 +21,8 @@ /* TODO (3.0) Figure out what flags are required */ #define RC4_FLAGS EVP_CIPH_FLAG_DEFAULT_ASN1 -static OSSL_OP_cipher_freectx_fn rc4_freectx; -static OSSL_OP_cipher_dupctx_fn rc4_dupctx; +static OSSL_FUNC_cipher_freectx_fn rc4_freectx; +static OSSL_FUNC_cipher_dupctx_fn rc4_dupctx; static void rc4_freectx(void *vctx) { @@ -46,13 +46,13 @@ static void *rc4_dupctx(void *ctx) } #define IMPLEMENT_cipher(alg, UCALG, flags, kbits, blkbits, ivbits, typ) \ -static OSSL_OP_cipher_get_params_fn alg##_##kbits##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_get_params; \ static int alg##_##kbits##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, 0, flags, \ kbits, blkbits, ivbits); \ } \ -static OSSL_OP_cipher_newctx_fn alg##_##kbits##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn alg##_##kbits##_newctx; \ static void * alg##_##kbits##_newctx(void *provctx) \ { \ PROV_##UCALG##_CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ diff --git a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c index 3b50517c9e..836274abb0 100644 --- a/providers/implementations/ciphers/cipher_rc4_hmac_md5.c +++ b/providers/implementations/ciphers/cipher_rc4_hmac_md5.c @@ -30,13 +30,13 @@ #define GET_HW(ctx) ((PROV_CIPHER_HW_RC4_HMAC_MD5 *)ctx->base.hw) -static OSSL_OP_cipher_newctx_fn rc4_hmac_md5_newctx; -static OSSL_OP_cipher_freectx_fn rc4_hmac_md5_freectx; -static OSSL_OP_cipher_get_ctx_params_fn rc4_hmac_md5_get_ctx_params; -static OSSL_OP_cipher_gettable_ctx_params_fn rc4_hmac_md5_gettable_ctx_params; -static OSSL_OP_cipher_set_ctx_params_fn rc4_hmac_md5_set_ctx_params; -static OSSL_OP_cipher_settable_ctx_params_fn rc4_hmac_md5_settable_ctx_params; -static OSSL_OP_cipher_get_params_fn rc4_hmac_md5_get_params; +static OSSL_FUNC_cipher_newctx_fn rc4_hmac_md5_newctx; +static OSSL_FUNC_cipher_freectx_fn rc4_hmac_md5_freectx; +static OSSL_FUNC_cipher_get_ctx_params_fn rc4_hmac_md5_get_ctx_params; +static OSSL_FUNC_cipher_gettable_ctx_params_fn rc4_hmac_md5_gettable_ctx_params; +static OSSL_FUNC_cipher_set_ctx_params_fn rc4_hmac_md5_set_ctx_params; +static OSSL_FUNC_cipher_settable_ctx_params_fn rc4_hmac_md5_settable_ctx_params; +static OSSL_FUNC_cipher_get_params_fn rc4_hmac_md5_get_params; #define rc4_hmac_md5_gettable_params cipher_generic_gettable_params #define rc4_hmac_md5_einit cipher_generic_einit #define rc4_hmac_md5_dinit cipher_generic_dinit diff --git a/providers/implementations/ciphers/cipher_rc5.c b/providers/implementations/ciphers/cipher_rc5.c index 486970823f..4d71927914 100644 --- a/providers/implementations/ciphers/cipher_rc5.c +++ b/providers/implementations/ciphers/cipher_rc5.c @@ -19,10 +19,10 @@ #include "prov/implementations.h" #include "prov/providercommonerr.h" -static OSSL_OP_cipher_freectx_fn rc5_freectx; -static OSSL_OP_cipher_dupctx_fn rc5_dupctx; -OSSL_OP_cipher_gettable_ctx_params_fn rc5_gettable_ctx_params; -OSSL_OP_cipher_settable_ctx_params_fn rc5_settable_ctx_params; +static OSSL_FUNC_cipher_freectx_fn rc5_freectx; +static OSSL_FUNC_cipher_dupctx_fn rc5_dupctx; +OSSL_FUNC_cipher_gettable_ctx_params_fn rc5_gettable_ctx_params; +OSSL_FUNC_cipher_settable_ctx_params_fn rc5_settable_ctx_params; static void rc5_freectx(void *vctx) { @@ -99,13 +99,13 @@ static int rc5_get_ctx_params(void *vctx, OSSL_PARAM params[]) #define IMPLEMENT_cipher(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)); \ diff --git a/providers/implementations/ciphers/cipher_seed.c b/providers/implementations/ciphers/cipher_seed.c index bf3801d776..3a3e012fe0 100644 --- a/providers/implementations/ciphers/cipher_seed.c +++ b/providers/implementations/ciphers/cipher_seed.c @@ -18,8 +18,8 @@ #include "cipher_seed.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn seed_freectx; -static OSSL_OP_cipher_dupctx_fn seed_dupctx; +static OSSL_FUNC_cipher_freectx_fn seed_freectx; +static OSSL_FUNC_cipher_dupctx_fn seed_dupctx; static void seed_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_sm4.c b/providers/implementations/ciphers/cipher_sm4.c index caa7ff9c21..e5f125ee30 100644 --- a/providers/implementations/ciphers/cipher_sm4.c +++ b/providers/implementations/ciphers/cipher_sm4.c @@ -12,8 +12,8 @@ #include "cipher_sm4.h" #include "prov/implementations.h" -static OSSL_OP_cipher_freectx_fn sm4_freectx; -static OSSL_OP_cipher_dupctx_fn sm4_dupctx; +static OSSL_FUNC_cipher_freectx_fn sm4_freectx; +static OSSL_FUNC_cipher_dupctx_fn sm4_dupctx; static void sm4_freectx(void *vctx) { diff --git a/providers/implementations/ciphers/cipher_tdes.h b/providers/implementations/ciphers/cipher_tdes.h index 8455cc4660..7bb689d583 100644 --- a/providers/implementations/ciphers/cipher_tdes.h +++ b/providers/implementations/ciphers/cipher_tdes.h @@ -32,13 +32,13 @@ typedef struct prov_tdes_ctx_st { #define IMPLEMENT_tdes_cipher(type, UCTYPE, lcmode, UCMODE, flags, \ kbits, blkbits, ivbits, block) \ -static OSSL_OP_cipher_newctx_fn tdes_##type##_##lcmode##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn tdes_##type##_##lcmode##_newctx; \ static void *tdes_##type##_##lcmode##_newctx(void *provctx) \ { \ return tdes_newctx(provctx, EVP_CIPH_##UCMODE##_MODE, kbits, blkbits, \ ivbits, flags, PROV_CIPHER_HW_tdes_##type##_##lcmode());\ } \ -static OSSL_OP_cipher_get_params_fn tdes_##type##_##lcmode##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn tdes_##type##_##lcmode##_get_params; \ static int tdes_##type##_##lcmode##_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_##UCMODE##_MODE, flags, \ @@ -71,12 +71,12 @@ const OSSL_DISPATCH tdes_##type##_##lcmode##_functions[] = { \ void *tdes_newctx(void *provctx, int mode, size_t kbits, size_t blkbits, size_t ivbits, uint64_t flags, const PROV_CIPHER_HW *hw); -OSSL_OP_cipher_dupctx_fn tdes_dupctx; -OSSL_OP_cipher_freectx_fn tdes_freectx; -OSSL_OP_cipher_encrypt_init_fn tdes_einit; -OSSL_OP_cipher_decrypt_init_fn tdes_dinit; -OSSL_OP_cipher_get_ctx_params_fn tdes_get_ctx_params; -OSSL_OP_cipher_gettable_ctx_params_fn tdes_gettable_ctx_params; +OSSL_FUNC_cipher_dupctx_fn tdes_dupctx; +OSSL_FUNC_cipher_freectx_fn tdes_freectx; +OSSL_FUNC_cipher_encrypt_init_fn tdes_einit; +OSSL_FUNC_cipher_decrypt_init_fn tdes_dinit; +OSSL_FUNC_cipher_get_ctx_params_fn tdes_get_ctx_params; +OSSL_FUNC_cipher_gettable_ctx_params_fn tdes_gettable_ctx_params; #define PROV_CIPHER_HW_tdes_mode(type, mode) \ static const PROV_CIPHER_HW type##_##mode = { \ diff --git a/providers/implementations/ciphers/cipher_tdes_wrap.c b/providers/implementations/ciphers/cipher_tdes_wrap.c index 8f4f562828..73d00a58d5 100644 --- a/providers/implementations/ciphers/cipher_tdes_wrap.c +++ b/providers/implementations/ciphers/cipher_tdes_wrap.c @@ -24,8 +24,8 @@ #define TDES_WRAP_FLAGS (EVP_CIPH_WRAP_MODE | EVP_CIPH_CUSTOM_IV) -static OSSL_OP_cipher_update_fn tdes_wrap_update; -static OSSL_OP_cipher_cipher_fn tdes_wrap_cipher; +static OSSL_FUNC_cipher_update_fn tdes_wrap_update; +static OSSL_FUNC_cipher_cipher_fn tdes_wrap_cipher; static const unsigned char wrap_iv[8] = { @@ -167,13 +167,13 @@ static int tdes_wrap_update(void *vctx, unsigned char *out, size_t *outl, # define IMPLEMENT_WRAP_CIPHER(flags, kbits, blkbits, ivbits) \ -static OSSL_OP_cipher_newctx_fn tdes_wrap_newctx; \ +static OSSL_FUNC_cipher_newctx_fn tdes_wrap_newctx; \ static void *tdes_wrap_newctx(void *provctx) \ { \ return tdes_newctx(provctx, EVP_CIPH_WRAP_MODE, kbits, blkbits, ivbits, \ flags, PROV_CIPHER_HW_tdes_wrap_cbc()); \ } \ -static OSSL_OP_cipher_get_params_fn tdes_wrap_get_params; \ +static OSSL_FUNC_cipher_get_params_fn tdes_wrap_get_params; \ static int tdes_wrap_get_params(OSSL_PARAM params[]) \ { \ return cipher_generic_get_params(params, EVP_CIPH_WRAP_MODE, flags, \ 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)); \ diff --git a/providers/implementations/exchange/dh_exch.c b/providers/implementations/exchange/dh_exch.c index c8ed76e8b1..765ab2e89a 100644 --- a/providers/implementations/exchange/dh_exch.c +++ b/providers/implementations/exchange/dh_exch.c @@ -22,14 +22,14 @@ #include "prov/provider_ctx.h" #include "crypto/dh.h" -static OSSL_OP_keyexch_newctx_fn dh_newctx; -static OSSL_OP_keyexch_init_fn dh_init; -static OSSL_OP_keyexch_set_peer_fn dh_set_peer; -static OSSL_OP_keyexch_derive_fn dh_derive; -static OSSL_OP_keyexch_freectx_fn dh_freectx; -static OSSL_OP_keyexch_dupctx_fn dh_dupctx; -static OSSL_OP_keyexch_set_ctx_params_fn dh_set_ctx_params; -static OSSL_OP_keyexch_settable_ctx_params_fn dh_settable_ctx_params; +static OSSL_FUNC_keyexch_newctx_fn dh_newctx; +static OSSL_FUNC_keyexch_init_fn dh_init; +static OSSL_FUNC_keyexch_set_peer_fn dh_set_peer; +static OSSL_FUNC_keyexch_derive_fn dh_derive; +static OSSL_FUNC_keyexch_freectx_fn dh_freectx; +static OSSL_FUNC_keyexch_dupctx_fn dh_dupctx; +static OSSL_FUNC_keyexch_set_ctx_params_fn dh_set_ctx_params; +static OSSL_FUNC_keyexch_settable_ctx_params_fn dh_settable_ctx_params; /* * What's passed as an actual key is defined by the KEYMGMT interface. diff --git a/providers/implementations/exchange/ecdh_exch.c b/providers/implementations/exchange/ecdh_exch.c index 686559d561..6334d0e8bd 100644 --- a/providers/implementations/exchange/ecdh_exch.c +++ b/providers/implementations/exchange/ecdh_exch.c @@ -25,16 +25,16 @@ #include "prov/implementations.h" #include "crypto/ec.h" /* ecdh_KDF_X9_63() */ -static OSSL_OP_keyexch_newctx_fn ecdh_newctx; -static OSSL_OP_keyexch_init_fn ecdh_init; -static OSSL_OP_keyexch_set_peer_fn ecdh_set_peer; -static OSSL_OP_keyexch_derive_fn ecdh_derive; -static OSSL_OP_keyexch_freectx_fn ecdh_freectx; -static OSSL_OP_keyexch_dupctx_fn ecdh_dupctx; -static OSSL_OP_keyexch_set_ctx_params_fn ecdh_set_ctx_params; -static OSSL_OP_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params; -static OSSL_OP_keyexch_get_ctx_params_fn ecdh_get_ctx_params; -static OSSL_OP_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params; +static OSSL_FUNC_keyexch_newctx_fn ecdh_newctx; +static OSSL_FUNC_keyexch_init_fn ecdh_init; +static OSSL_FUNC_keyexch_set_peer_fn ecdh_set_peer; +static OSSL_FUNC_keyexch_derive_fn ecdh_derive; +static OSSL_FUNC_keyexch_freectx_fn ecdh_freectx; +static OSSL_FUNC_keyexch_dupctx_fn ecdh_dupctx; +static OSSL_FUNC_keyexch_set_ctx_params_fn ecdh_set_ctx_params; +static OSSL_FUNC_keyexch_settable_ctx_params_fn ecdh_settable_ctx_params; +static OSSL_FUNC_keyexch_get_ctx_params_fn ecdh_get_ctx_params; +static OSSL_FUNC_keyexch_gettable_ctx_params_fn ecdh_gettable_ctx_params; enum kdf_type { PROV_ECDH_KDF_NONE = 0, diff --git a/providers/implementations/exchange/ecx_exch.c b/providers/implementations/exchange/ecx_exch.c index 311a31d36a..4840b8802f 100644 --- a/providers/implementations/exchange/ecx_exch.c +++ b/providers/implementations/exchange/ecx_exch.c @@ -20,13 +20,13 @@ # include "s390x_arch.h" #endif -static OSSL_OP_keyexch_newctx_fn x25519_newctx; -static OSSL_OP_keyexch_newctx_fn x448_newctx; -static OSSL_OP_keyexch_init_fn ecx_init; -static OSSL_OP_keyexch_set_peer_fn ecx_set_peer; -static OSSL_OP_keyexch_derive_fn ecx_derive; -static OSSL_OP_keyexch_freectx_fn ecx_freectx; -static OSSL_OP_keyexch_dupctx_fn ecx_dupctx; +static OSSL_FUNC_keyexch_newctx_fn x25519_newctx; +static OSSL_FUNC_keyexch_newctx_fn x448_newctx; +static OSSL_FUNC_keyexch_init_fn ecx_init; +static OSSL_FUNC_keyexch_set_peer_fn ecx_set_peer; +static OSSL_FUNC_keyexch_derive_fn ecx_derive; +static OSSL_FUNC_keyexch_freectx_fn ecx_freectx; +static OSSL_FUNC_keyexch_dupctx_fn ecx_dupctx; /* * What's passed as an actual key is defined by the KEYMGMT interface. 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)); \ diff --git a/providers/implementations/include/prov/ciphercommon_aead.h b/providers/implementations/include/prov/ciphercommon_aead.h index db938d7fbe..e1a6b9388d 100644 --- a/providers/implementations/include/prov/ciphercommon_aead.h +++ b/providers/implementations/include/prov/ciphercommon_aead.h @@ -17,13 +17,13 @@ | EVP_CIPH_CUSTOM_COPY) #define IMPLEMENT_aead_cipher(alg, lc, UCMODE, flags, kbits, blkbits, ivbits) \ -static OSSL_OP_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ +static OSSL_FUNC_cipher_get_params_fn alg##_##kbits##_##lc##_get_params; \ static int alg##_##kbits##_##lc##_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##lc##_newctx; \ +static OSSL_FUNC_cipher_newctx_fn alg##kbits##lc##_newctx; \ static void * alg##kbits##lc##_newctx(void *provctx) \ { \ return alg##_##lc##_newctx(provctx, kbits); \ diff --git a/providers/implementations/include/prov/ciphercommon_ccm.h b/providers/implementations/include/prov/ciphercommon_ccm.h index 7059789fd1..67f3176e80 100644 --- a/providers/implementations/include/prov/ciphercommon_ccm.h +++ b/providers/implementations/include/prov/ciphercommon_ccm.h @@ -78,13 +78,13 @@ struct prov_ccm_hw_st { OSSL_CCM_gettag_fn gettag; }; -OSSL_OP_cipher_encrypt_init_fn ccm_einit; -OSSL_OP_cipher_decrypt_init_fn ccm_dinit; -OSSL_OP_cipher_get_ctx_params_fn ccm_get_ctx_params; -OSSL_OP_cipher_set_ctx_params_fn ccm_set_ctx_params; -OSSL_OP_cipher_update_fn ccm_stream_update; -OSSL_OP_cipher_final_fn ccm_stream_final; -OSSL_OP_cipher_cipher_fn ccm_cipher; +OSSL_FUNC_cipher_encrypt_init_fn ccm_einit; +OSSL_FUNC_cipher_decrypt_init_fn ccm_dinit; +OSSL_FUNC_cipher_get_ctx_params_fn ccm_get_ctx_params; +OSSL_FUNC_cipher_set_ctx_params_fn ccm_set_ctx_params; +OSSL_FUNC_cipher_update_fn ccm_stream_update; +OSSL_FUNC_cipher_final_fn ccm_stream_final; +OSSL_FUNC_cipher_cipher_fn ccm_cipher; void ccm_initctx(PROV_CCM_CTX *ctx, size_t keybits, const PROV_CCM_HW *hw); int ccm_generic_setiv(PROV_CCM_CTX *ctx, const unsigned char *nonce, diff --git a/providers/implementations/include/prov/ciphercommon_gcm.h b/providers/implementations/include/prov/ciphercommon_gcm.h index d651b3827a..8c4a80613b 100644 --- a/providers/implementations/include/prov/ciphercommon_gcm.h +++ b/providers/implementations/include/prov/ciphercommon_gcm.h @@ -102,13 +102,13 @@ struct prov_gcm_hw_st { OSSL_GCM_oneshot_fn oneshot; }; -OSSL_OP_cipher_encrypt_init_fn gcm_einit; -OSSL_OP_cipher_decrypt_init_fn gcm_dinit; -OSSL_OP_cipher_get_ctx_params_fn gcm_get_ctx_params; -OSSL_OP_cipher_set_ctx_params_fn gcm_set_ctx_params; -OSSL_OP_cipher_cipher_fn gcm_cipher; -OSSL_OP_cipher_update_fn gcm_stream_update; -OSSL_OP_cipher_final_fn gcm_stream_final; +OSSL_FUNC_cipher_encrypt_init_fn gcm_einit; +OSSL_FUNC_cipher_decrypt_init_fn gcm_dinit; +OSSL_FUNC_cipher_get_ctx_params_fn gcm_get_ctx_params; +OSSL_FUNC_cipher_set_ctx_params_fn gcm_set_ctx_params; +OSSL_FUNC_cipher_cipher_fn gcm_cipher; +OSSL_FUNC_cipher_update_fn gcm_stream_update; +OSSL_FUNC_cipher_final_fn gcm_stream_final; void gcm_initctx(void *provctx, PROV_GCM_CTX *ctx, size_t keybits, const PROV_GCM_HW *hw, size_t ivlen_min); diff --git a/providers/implementations/include/prov/digestcommon.h b/providers/implementations/include/prov/digestcommon.h index 99fe09cbe6..1ccc5596e6 100644 --- a/providers/implementations/include/prov/digestcommon.h +++ b/providers/implementations/include/prov/digestcommon.h @@ -19,7 +19,7 @@ extern "C" { # endif #define PROV_FUNC_DIGEST_GET_PARAM(name, blksize, dgstsize, flags) \ -static OSSL_OP_digest_get_params_fn name##_get_params; \ +static OSSL_FUNC_digest_get_params_fn name##_get_params; \ static int name##_get_params(OSSL_PARAM params[]) \ { \ return digest_default_get_params(params, blksize, dgstsize, flags); \ @@ -32,9 +32,9 @@ static int name##_get_params(OSSL_PARAM params[]) \ # define PROV_DISPATCH_FUNC_DIGEST_CONSTRUCT_START( \ name, CTX, blksize, dgstsize, flags, init, upd, fin) \ -static OSSL_OP_digest_newctx_fn name##_newctx; \ -static OSSL_OP_digest_freectx_fn name##_freectx; \ -static OSSL_OP_digest_dupctx_fn name##_dupctx; \ +static OSSL_FUNC_digest_newctx_fn name##_newctx; \ +static OSSL_FUNC_digest_freectx_fn name##_freectx; \ +static OSSL_FUNC_digest_dupctx_fn name##_dupctx; \ static void *name##_newctx(void *prov_ctx) \ { \ CTX *ctx = OPENSSL_zalloc(sizeof(*ctx)); \ @@ -53,7 +53,7 @@ static void *name##_dupctx(void *ctx) \ *ret = *in; \ return ret; \ } \ -static OSSL_OP_digest_final_fn name##_internal_final; \ +static OSSL_FUNC_digest_final_fn name##_internal_final; \ static int name##_internal_final(void *ctx, unsigned char *out, size_t *outl, \ size_t outsz) \ { \ diff --git a/providers/implementations/kdfs/hkdf.c b/providers/implementations/kdfs/hkdf.c index bbf622c3df..77f4f2c8cc 100644 --- a/providers/implementations/kdfs/hkdf.c +++ b/providers/implementations/kdfs/hkdf.c @@ -31,14 +31,14 @@ #define HKDF_MAXBUF 1024 -static OSSL_OP_kdf_newctx_fn kdf_hkdf_new; -static OSSL_OP_kdf_freectx_fn kdf_hkdf_free; -static OSSL_OP_kdf_reset_fn kdf_hkdf_reset; -static OSSL_OP_kdf_derive_fn kdf_hkdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kdf_hkdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kdf_hkdf_set_ctx_params; -static OSSL_OP_kdf_gettable_ctx_params_fn kdf_hkdf_gettable_ctx_params; -static OSSL_OP_kdf_get_ctx_params_fn kdf_hkdf_get_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kdf_hkdf_new; +static OSSL_FUNC_kdf_freectx_fn kdf_hkdf_free; +static OSSL_FUNC_kdf_reset_fn kdf_hkdf_reset; +static OSSL_FUNC_kdf_derive_fn kdf_hkdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_hkdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kdf_hkdf_set_ctx_params; +static OSSL_FUNC_kdf_gettable_ctx_params_fn kdf_hkdf_gettable_ctx_params; +static OSSL_FUNC_kdf_get_ctx_params_fn kdf_hkdf_get_ctx_params; static int HKDF(const EVP_MD *evp_md, const unsigned char *salt, size_t salt_len, diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c index 12bf711eed..86177bebdf 100644 --- a/providers/implementations/kdfs/kbkdf.c +++ b/providers/implementations/kdfs/kbkdf.c @@ -69,12 +69,12 @@ typedef struct { } KBKDF; /* Definitions needed for typechecking. */ -static OSSL_OP_kdf_newctx_fn kbkdf_new; -static OSSL_OP_kdf_freectx_fn kbkdf_free; -static OSSL_OP_kdf_reset_fn kbkdf_reset; -static OSSL_OP_kdf_derive_fn kbkdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kbkdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kbkdf_set_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kbkdf_new; +static OSSL_FUNC_kdf_freectx_fn kbkdf_free; +static OSSL_FUNC_kdf_reset_fn kbkdf_reset; +static OSSL_FUNC_kdf_derive_fn kbkdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kbkdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kbkdf_set_ctx_params; /* Not all platforms have htobe32(). */ static uint32_t be32(uint32_t host) diff --git a/providers/implementations/kdfs/krb5kdf.c b/providers/implementations/kdfs/krb5kdf.c index 0a97b8e3f9..4ae29a24c4 100644 --- a/providers/implementations/kdfs/krb5kdf.c +++ b/providers/implementations/kdfs/krb5kdf.c @@ -32,14 +32,14 @@ /* KRB5 KDF defined in RFC 3961, Section 5.1 */ -static OSSL_OP_kdf_newctx_fn krb5kdf_new; -static OSSL_OP_kdf_freectx_fn krb5kdf_free; -static OSSL_OP_kdf_reset_fn krb5kdf_reset; -static OSSL_OP_kdf_derive_fn krb5kdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn krb5kdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn krb5kdf_set_ctx_params; -static OSSL_OP_kdf_gettable_ctx_params_fn krb5kdf_gettable_ctx_params; -static OSSL_OP_kdf_get_ctx_params_fn krb5kdf_get_ctx_params; +static OSSL_FUNC_kdf_newctx_fn krb5kdf_new; +static OSSL_FUNC_kdf_freectx_fn krb5kdf_free; +static OSSL_FUNC_kdf_reset_fn krb5kdf_reset; +static OSSL_FUNC_kdf_derive_fn krb5kdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn krb5kdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn krb5kdf_set_ctx_params; +static OSSL_FUNC_kdf_gettable_ctx_params_fn krb5kdf_gettable_ctx_params; +static OSSL_FUNC_kdf_get_ctx_params_fn krb5kdf_get_ctx_params; static int KRB5KDF(const EVP_CIPHER *cipher, ENGINE *engine, const unsigned char *key, size_t key_len, diff --git a/providers/implementations/kdfs/pbkdf2.c b/providers/implementations/kdfs/pbkdf2.c index 0f081cc1aa..6ac0783096 100644 --- a/providers/implementations/kdfs/pbkdf2.c +++ b/providers/implementations/kdfs/pbkdf2.c @@ -35,12 +35,12 @@ #define KDF_PBKDF2_MIN_ITERATIONS 1000 #define KDF_PBKDF2_MIN_SALT_LEN (128 / 8) -static OSSL_OP_kdf_newctx_fn kdf_pbkdf2_new; -static OSSL_OP_kdf_freectx_fn kdf_pbkdf2_free; -static OSSL_OP_kdf_reset_fn kdf_pbkdf2_reset; -static OSSL_OP_kdf_derive_fn kdf_pbkdf2_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kdf_pbkdf2_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kdf_pbkdf2_set_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kdf_pbkdf2_new; +static OSSL_FUNC_kdf_freectx_fn kdf_pbkdf2_free; +static OSSL_FUNC_kdf_reset_fn kdf_pbkdf2_reset; +static OSSL_FUNC_kdf_derive_fn kdf_pbkdf2_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_pbkdf2_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kdf_pbkdf2_set_ctx_params; static int pbkdf2_derive(const char *pass, size_t passlen, const unsigned char *salt, int saltlen, uint64_t iter, diff --git a/providers/implementations/kdfs/scrypt.c b/providers/implementations/kdfs/scrypt.c index a0a5af1564..77869f957d 100644 --- a/providers/implementations/kdfs/scrypt.c +++ b/providers/implementations/kdfs/scrypt.c @@ -23,12 +23,12 @@ #ifndef OPENSSL_NO_SCRYPT -static OSSL_OP_kdf_newctx_fn kdf_scrypt_new; -static OSSL_OP_kdf_freectx_fn kdf_scrypt_free; -static OSSL_OP_kdf_reset_fn kdf_scrypt_reset; -static OSSL_OP_kdf_derive_fn kdf_scrypt_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kdf_scrypt_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kdf_scrypt_set_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kdf_scrypt_new; +static OSSL_FUNC_kdf_freectx_fn kdf_scrypt_free; +static OSSL_FUNC_kdf_reset_fn kdf_scrypt_reset; +static OSSL_FUNC_kdf_derive_fn kdf_scrypt_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_scrypt_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kdf_scrypt_set_ctx_params; static int scrypt_alg(const char *pass, size_t passlen, const unsigned char *salt, size_t saltlen, diff --git a/providers/implementations/kdfs/sshkdf.c b/providers/implementations/kdfs/sshkdf.c index 4ba9a16408..137299235a 100644 --- a/providers/implementations/kdfs/sshkdf.c +++ b/providers/implementations/kdfs/sshkdf.c @@ -22,14 +22,14 @@ # include "prov/provider_util.h" /* See RFC 4253, Section 7.2 */ -static OSSL_OP_kdf_newctx_fn kdf_sshkdf_new; -static OSSL_OP_kdf_freectx_fn kdf_sshkdf_free; -static OSSL_OP_kdf_reset_fn kdf_sshkdf_reset; -static OSSL_OP_kdf_derive_fn kdf_sshkdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kdf_sshkdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kdf_sshkdf_set_ctx_params; -static OSSL_OP_kdf_gettable_ctx_params_fn kdf_sshkdf_gettable_ctx_params; -static OSSL_OP_kdf_get_ctx_params_fn kdf_sshkdf_get_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kdf_sshkdf_new; +static OSSL_FUNC_kdf_freectx_fn kdf_sshkdf_free; +static OSSL_FUNC_kdf_reset_fn kdf_sshkdf_reset; +static OSSL_FUNC_kdf_derive_fn kdf_sshkdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_sshkdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kdf_sshkdf_set_ctx_params; +static OSSL_FUNC_kdf_gettable_ctx_params_fn kdf_sshkdf_gettable_ctx_params; +static OSSL_FUNC_kdf_get_ctx_params_fn kdf_sshkdf_get_ctx_params; static int SSHKDF(const EVP_MD *evp_md, const unsigned char *key, size_t key_len, diff --git a/providers/implementations/kdfs/sskdf.c b/providers/implementations/kdfs/sskdf.c index 023395b14d..cf5a9e7129 100644 --- a/providers/implementations/kdfs/sskdf.c +++ b/providers/implementations/kdfs/sskdf.c @@ -70,15 +70,15 @@ typedef struct { /* KMAC uses a Customisation string of 'KDF' */ static const unsigned char kmac_custom_str[] = { 0x4B, 0x44, 0x46 }; -static OSSL_OP_kdf_newctx_fn sskdf_new; -static OSSL_OP_kdf_freectx_fn sskdf_free; -static OSSL_OP_kdf_reset_fn sskdf_reset; -static OSSL_OP_kdf_derive_fn sskdf_derive; -static OSSL_OP_kdf_derive_fn x963kdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn sskdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn sskdf_set_ctx_params; -static OSSL_OP_kdf_gettable_ctx_params_fn sskdf_gettable_ctx_params; -static OSSL_OP_kdf_get_ctx_params_fn sskdf_get_ctx_params; +static OSSL_FUNC_kdf_newctx_fn sskdf_new; +static OSSL_FUNC_kdf_freectx_fn sskdf_free; +static OSSL_FUNC_kdf_reset_fn sskdf_reset; +static OSSL_FUNC_kdf_derive_fn sskdf_derive; +static OSSL_FUNC_kdf_derive_fn x963kdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn sskdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn sskdf_set_ctx_params; +static OSSL_FUNC_kdf_gettable_ctx_params_fn sskdf_gettable_ctx_params; +static OSSL_FUNC_kdf_get_ctx_params_fn sskdf_get_ctx_params; /* * Refer to https://csrc.nist.gov/publications/detail/sp/800-56c/rev-1/final diff --git a/providers/implementations/kdfs/tls1_prf.c b/providers/implementations/kdfs/tls1_prf.c index 1b47247cbb..05e394e0b4 100644 --- a/providers/implementations/kdfs/tls1_prf.c +++ b/providers/implementations/kdfs/tls1_prf.c @@ -61,12 +61,12 @@ #include "prov/provider_util.h" #include "e_os.h" -static OSSL_OP_kdf_newctx_fn kdf_tls1_prf_new; -static OSSL_OP_kdf_freectx_fn kdf_tls1_prf_free; -static OSSL_OP_kdf_reset_fn kdf_tls1_prf_reset; -static OSSL_OP_kdf_derive_fn kdf_tls1_prf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn kdf_tls1_prf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn kdf_tls1_prf_set_ctx_params; +static OSSL_FUNC_kdf_newctx_fn kdf_tls1_prf_new; +static OSSL_FUNC_kdf_freectx_fn kdf_tls1_prf_free; +static OSSL_FUNC_kdf_reset_fn kdf_tls1_prf_reset; +static OSSL_FUNC_kdf_derive_fn kdf_tls1_prf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn kdf_tls1_prf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn kdf_tls1_prf_set_ctx_params; static int tls1_prf_alg(EVP_MAC_CTX *mdctx, EVP_MAC_CTX *sha1ctx, const unsigned char *sec, size_t slen, diff --git a/providers/implementations/kdfs/x942kdf.c b/providers/implementations/kdfs/x942kdf.c index 1459e0f661..13352638c2 100644 --- a/providers/implementations/kdfs/x942kdf.c +++ b/providers/implementations/kdfs/x942kdf.c @@ -32,14 +32,14 @@ # define X942KDF_MAX_INLEN (1 << 30) -static OSSL_OP_kdf_newctx_fn x942kdf_new; -static OSSL_OP_kdf_freectx_fn x942kdf_free; -static OSSL_OP_kdf_reset_fn x942kdf_reset; -static OSSL_OP_kdf_derive_fn x942kdf_derive; -static OSSL_OP_kdf_settable_ctx_params_fn x942kdf_settable_ctx_params; -static OSSL_OP_kdf_set_ctx_params_fn x942kdf_set_ctx_params; -static OSSL_OP_kdf_gettable_ctx_params_fn x942kdf_gettable_ctx_params; -static OSSL_OP_kdf_get_ctx_params_fn x942kdf_get_ctx_params; +static OSSL_FUNC_kdf_newctx_fn x942kdf_new; +static OSSL_FUNC_kdf_freectx_fn x942kdf_free; +static OSSL_FUNC_kdf_reset_fn x942kdf_reset; +static OSSL_FUNC_kdf_derive_fn x942kdf_derive; +static OSSL_FUNC_kdf_settable_ctx_params_fn x942kdf_settable_ctx_params; +static OSSL_FUNC_kdf_set_ctx_params_fn x942kdf_set_ctx_params; +static OSSL_FUNC_kdf_gettable_ctx_params_fn x942kdf_gettable_ctx_params; +static OSSL_FUNC_kdf_get_ctx_params_fn x942kdf_get_ctx_params; typedef struct { void *provctx; diff --git a/providers/implementations/keymgmt/dh_kmgmt.c b/providers/implementations/keymgmt/dh_kmgmt.c index 52709b4e2d..aa4097766d 100644 --- a/providers/implementations/keymgmt/dh_kmgmt.c +++ b/providers/implementations/keymgmt/dh_kmgmt.c @@ -26,25 +26,25 @@ #include "internal/nelem.h" #include "internal/param_build_set.h" -static OSSL_OP_keymgmt_new_fn dh_newdata; -static OSSL_OP_keymgmt_free_fn dh_freedata; -static OSSL_OP_keymgmt_gen_init_fn dh_gen_init; -static OSSL_OP_keymgmt_gen_set_template_fn dh_gen_set_template; -static OSSL_OP_keymgmt_gen_set_params_fn dh_gen_set_params; -static OSSL_OP_keymgmt_gen_settable_params_fn dh_gen_settable_params; -static OSSL_OP_keymgmt_gen_fn dh_gen; -static OSSL_OP_keymgmt_gen_cleanup_fn dh_gen_cleanup; -static OSSL_OP_keymgmt_get_params_fn dh_get_params; -static OSSL_OP_keymgmt_gettable_params_fn dh_gettable_params; -static OSSL_OP_keymgmt_set_params_fn dh_set_params; -static OSSL_OP_keymgmt_settable_params_fn dh_settable_params; -static OSSL_OP_keymgmt_has_fn dh_has; -static OSSL_OP_keymgmt_match_fn dh_match; -static OSSL_OP_keymgmt_validate_fn dh_validate; -static OSSL_OP_keymgmt_import_fn dh_import; -static OSSL_OP_keymgmt_import_types_fn dh_import_types; -static OSSL_OP_keymgmt_export_fn dh_export; -static OSSL_OP_keymgmt_export_types_fn dh_export_types; +static OSSL_FUNC_keymgmt_new_fn dh_newdata; +static OSSL_FUNC_keymgmt_free_fn dh_freedata; +static OSSL_FUNC_keymgmt_gen_init_fn dh_gen_init; +static OSSL_FUNC_keymgmt_gen_set_template_fn dh_gen_set_template; +static OSSL_FUNC_keymgmt_gen_set_params_fn dh_gen_set_params; +static OSSL_FUNC_keymgmt_gen_settable_params_fn dh_gen_settable_params; +static OSSL_FUNC_keymgmt_gen_fn dh_gen; +static OSSL_FUNC_keymgmt_gen_cleanup_fn dh_gen_cleanup; +static OSSL_FUNC_keymgmt_get_params_fn dh_get_params; +static OSSL_FUNC_keymgmt_gettable_params_fn dh_gettable_params; +static OSSL_FUNC_keymgmt_set_params_fn dh_set_params; +static OSSL_FUNC_keymgmt_settable_params_fn dh_settable_params; +static OSSL_FUNC_keymgmt_has_fn dh_has; +static OSSL_FUNC_keymgmt_match_fn dh_match; +static OSSL_FUNC_keymgmt_validate_fn dh_validate; +static OSSL_FUNC_keymgmt_import_fn dh_import; +static OSSL_FUNC_keymgmt_import_types_fn dh_import_types; +static OSSL_FUNC_keymgmt_export_fn dh_export; +static OSSL_FUNC_keymgmt_export_types_fn dh_export_types; #define DH_POSSIBLE_SELECTIONS \ (OSSL_KEYMGMT_SELECT_KEYPAIR | OSSL_KEYMGMT_SELECT_DOMAIN_PARAMETERS) diff --git a/providers/implementations/keymgmt/dsa_kmgmt.c b/providers/implementations/keymgmt/dsa_kmgmt.c index feadb875dc..3d38fea44d 100644 --- a/providers/implementations/keymgmt/dsa_kmgmt.c +++ b/providers/implementations/keymgmt/dsa_kmgmt.c @@ -26,23 +26,23 @@ #include "internal/nelem.h" #include "internal/param_build_set.h" -static OSSL_OP_keymgmt_new_fn dsa_newdata; -static OSSL_OP_keymgmt_free_fn dsa_freedata; -static OSSL_OP_keymgmt_gen_init_fn dsa_gen_init; -static OSSL_OP_keymgmt_gen_set_template_fn dsa_gen_set_template; -static OSSL_OP_keymgmt_gen_set_params_fn dsa_gen_set_params; -static OSSL_OP_keymgmt_gen_settable_params_fn dsa_gen_settable_params; -static OSSL_OP_keymgmt_gen_fn dsa_gen; -static OSSL_OP_keymgmt_gen_cleanup_fn dsa_gen_cleanup; -static OSSL_OP_keymgmt_get_params_fn dsa_get_params; -static OSSL_OP_keymgmt_gettable_params_fn dsa_gettable_params; -static OSSL_OP_keymgmt_has_fn dsa_has; -static OSSL_OP_keymgmt_match_fn dsa_match; -static OSSL_OP_keymgmt_validate_fn dsa_validate; -static OSSL_OP_keymgmt_import_fn dsa_import; -static OSSL_OP_keymgmt_import_types_fn dsa_import_types; -static OSSL_OP_keymgmt_export_fn dsa_export; -static OSSL_OP_keymgmt_export_types_fn dsa_export_types; +static OSSL_FUNC_keymgmt_new_fn dsa_newdata; +static OSSL_FUNC_keymgmt_free_fn dsa_freedata; +static OSSL_FUNC_keymgmt_gen_init_fn dsa_gen_init; +static OSSL_FUNC_keymgmt_gen_set_template_fn dsa_gen_set_template; +static OSSL_FUNC_keymgmt_gen_set_params_fn dsa_gen_set_params; +static OSSL_FUNC_keymgmt_gen_settable_params_fn dsa_gen_settable_params; +static OSSL_FUNC_keymgmt_gen_fn dsa_gen; +static OSSL_FUNC_keymgmt_gen_cleanup_fn dsa_gen_cleanup; +static OSSL_FUNC_keymgmt_get_params_fn dsa_get_params; +static OSSL_FUNC_keymgmt_gettable_params_fn dsa_gettable_params; +static OSSL_FUNC_keymgmt_has_fn dsa_has; +static OSSL_FUNC_keymgmt_match_fn dsa_match; +static OSSL_FUNC_keymgmt_validate_fn dsa_validate; +static OSSL_FUNC_keymgmt_import_fn dsa_import; +static OSSL_FUNC_keymgmt_import_types_fn dsa_import_types; +static OSSL_FUNC_keymgmt_export_fn dsa_export; +static OSSL_FUNC_keymgmt_export_types_fn dsa_export_types; #define DSA_DEFAULT_MD "SHA256" #define DSA_POSSIBLE_SELECTIONS \ diff --git a/providers/implementations/keymgmt/ec_kmgmt.c b/providers/implementations/keymgmt/ec_kmgmt.c index 7212ddf973..c1114eee7f 100644 --- a/providers/implementations/keymgmt/ec_kmgmt.c +++ b/providers/implementations/keymgmt/ec_kmgmt.c @@ -26,26 +26,26 @@ #include "prov/provider_ctx.h" #include "internal/param_build_set.h" -static OSSL_OP_keymgmt_new_fn ec_newdata; -static OSSL_OP_keymgmt_gen_init_fn ec_gen_init; -static OSSL_OP_keymgmt_gen_set_template_fn ec_gen_set_template; -static OSSL_OP_keymgmt_gen_set_params_fn ec_gen_set_params; -static OSSL_OP_keymgmt_gen_settable_params_fn ec_gen_settable_params; -static OSSL_OP_keymgmt_gen_fn ec_gen; -static OSSL_OP_keymgmt_gen_cleanup_fn ec_gen_cleanup; -static OSSL_OP_keymgmt_free_fn ec_freedata; -static OSSL_OP_keymgmt_get_params_fn ec_get_params; -static OSSL_OP_keymgmt_gettable_params_fn ec_gettable_params; -static OSSL_OP_keymgmt_set_params_fn ec_set_params; -static OSSL_OP_keymgmt_settable_params_fn ec_settable_params; -static OSSL_OP_keymgmt_has_fn ec_has; -static OSSL_OP_keymgmt_match_fn ec_match; -static OSSL_OP_keymgmt_validate_fn ec_validate; -static OSSL_OP_keymgmt_import_fn ec_import; -static OSSL_OP_keymgmt_import_types_fn ec_import_types; -static OSSL_OP_keymgmt_export_fn ec_export; -static OSSL_OP_keymgmt_export_types_fn ec_export_types; -static OSSL_OP_keymgmt_query_operation_name_fn ec_query_operation_name; +static OSSL_FUNC_keymgmt_new_fn ec_newdata; +static OSSL_FUNC_keymgmt_gen_init_fn ec_gen_init; +static OSSL_FUNC_keymgmt_gen_set_template_fn ec_gen_set_template; +static OSSL_FUNC_keymgmt_gen_set_params_fn ec_gen_set_params; +static OSSL_FUNC_keymgmt_gen_settable_params_fn ec_gen_settable_params; +static OSSL_FUNC_keymgmt_gen_fn ec_gen; +static OSSL_FUNC_keymgmt_gen_cleanup_fn ec_gen_cleanup; +static OSSL_FUNC_keymgmt_free_fn ec_freedata; +static OSSL_FUNC_keymgmt_get_params_fn ec_get_params; +static OSSL_FUNC_keymgmt_gettable_params_fn ec_gettable_params; +static OSSL_FUNC_keymgmt_set_params_fn ec_set_params; +static OSSL_FUNC_keymgmt_settable_params_fn ec_settable_params; +static OSSL_FUNC_keymgmt_has_fn ec_has; +static OSSL_FUNC_keymgmt_match_fn ec_match; +static OSSL_FUNC_keymgmt_validate_fn ec_validate; +static OSSL_FUNC_keymgmt_import_fn ec_import; +static OSSL_FUNC_keymgmt_import_types_fn ec_import_types; +static OSSL_FUNC_keymgmt_export_fn ec_export; +static OSSL_FUNC_keymgmt_export_types_fn ec_export_types; +static OSSL_FUNC_keymgmt_query_operation_name_fn ec_query_operation_name; #define EC_DEFAULT_MD "SHA256" #define EC_POSSIBLE_SELECTIONS \ diff --git a/providers/implementations/keymgmt/ecx_kmgmt.c b/providers/implementations/keymgmt/ecx_kmgmt.c index 33fecba8b8..542592666e 100644 --- a/providers/implementations/keymgmt/ecx_kmgmt.c +++ b/providers/implementations/keymgmt/ecx_kmgmt.c @@ -28,41 +28,41 @@ # include <openssl/sha.h> /* For SHA512_DIGEST_LENGTH */ #endif -static OSSL_OP_keymgmt_new_fn x25519_new_key; -static OSSL_OP_keymgmt_new_fn x448_new_key; -static OSSL_OP_keymgmt_new_fn ed25519_new_key; -static OSSL_OP_keymgmt_new_fn ed448_new_key; -static OSSL_OP_keymgmt_gen_init_fn x25519_gen_init; -static OSSL_OP_keymgmt_gen_init_fn x448_gen_init; -static OSSL_OP_keymgmt_gen_init_fn ed25519_gen_init; -static OSSL_OP_keymgmt_gen_init_fn ed448_gen_init; -static OSSL_OP_keymgmt_gen_fn x25519_gen; -static OSSL_OP_keymgmt_gen_fn x448_gen; -static OSSL_OP_keymgmt_gen_fn ed25519_gen; -static OSSL_OP_keymgmt_gen_fn ed448_gen; -static OSSL_OP_keymgmt_gen_cleanup_fn ecx_gen_cleanup; -static OSSL_OP_keymgmt_get_params_fn x25519_get_params; -static OSSL_OP_keymgmt_get_params_fn x448_get_params; -static OSSL_OP_keymgmt_get_params_fn ed25519_get_params; -static OSSL_OP_keymgmt_get_params_fn ed448_get_params; -static OSSL_OP_keymgmt_gettable_params_fn x25519_gettable_params; -static OSSL_OP_keymgmt_gettable_params_fn x448_gettable_params; -static OSSL_OP_keymgmt_gettable_params_fn ed25519_gettable_params; -static OSSL_OP_keymgmt_gettable_params_fn ed448_gettable_params; -static OSSL_OP_keymgmt_set_params_fn x25519_set_params; -static OSSL_OP_keymgmt_set_params_fn x448_set_params; -static OSSL_OP_keymgmt_set_params_fn ed25519_set_params; -static OSSL_OP_keymgmt_set_params_fn ed448_set_params; -static OSSL_OP_keymgmt_settable_params_fn x25519_settable_params; -static OSSL_OP_keymgmt_settable_params_fn x448_settable_params; -static OSSL_OP_keymgmt_settable_params_fn ed25519_settable_params; -static OSSL_OP_keymgmt_settable_params_fn ed448_settable_params; -static OSSL_OP_keymgmt_has_fn ecx_has; -static OSSL_OP_keymgmt_match_fn ecx_match; -static OSSL_OP_keymgmt_import_fn ecx_import; -static OSSL_OP_keymgmt_import_types_fn ecx_imexport_types; -static OSSL_OP_keymgmt_export_fn ecx_export; -static OSSL_OP_keymgmt_export_types_fn ecx_imexport_types; +static OSSL_FUNC_keymgmt_new_fn x25519_new_key; +static OSSL_FUNC_keymgmt_new_fn x448_new_key; +static OSSL_FUNC_keymgmt_new_fn ed25519_new_key; +static OSSL_FUNC_keymgmt_new_fn ed448_new_key; +static OSSL_FUNC_keymgmt_gen_init_fn x25519_gen_init; +static OSSL_FUNC_keymgmt_gen_init_fn x448_gen_init; +static OSSL_FUNC_keymgmt_gen_init_fn ed25519_gen_init; +static OSSL_FUNC_keymgmt_gen_init_fn ed448_gen_init; +static OSSL_FUNC_keymgmt_gen_fn x25519_gen; +static OSSL_FUNC_keymgmt_gen_fn x448_gen; +static OSSL_FUNC_keymgmt_gen_fn ed25519_gen; +static OSSL_FUNC_keymgmt_gen_fn ed448_gen; +static OSSL_FUNC_keymgmt_gen_cleanup_fn ecx_gen_cleanup; +static OSSL_FUNC_keymgmt_get_params_fn x25519_get_params; +static OSSL_FUNC_keymgmt_get_params_fn x448_get_params; +static OSSL_FUNC_keymgmt_get_params_fn ed25519_get_params; +static OSSL_FUNC_keymgmt_get_params_fn ed448_get_params; +static OSSL_FUNC_keymgmt_gettable_params_fn x25519_gettable_params; +static OSSL_FUNC_keymgmt_gettable_params_fn x448_gettable_params; +static OSSL_FUNC_keymgmt_gettable_params_fn ed25519_gettable_params; +static OSSL_FUNC_keymgmt_gettable_params_fn ed448_gettable_params; +static OSSL_FUNC_keymgmt_set_params_fn x25519_set_params; +static OSSL_FUNC_keymgmt_set_params_fn x448_set_params; +static OSSL_FUNC_keymgmt_set_params_fn ed25519_set_params; +static OSSL_FUNC_keymgmt_set_params_fn ed448_set_params; +static OSSL_FUNC_keymgmt_settable_params_fn x25519_settable_params; +static OSSL_FUNC_keymgmt_settable_params_fn x448_settable_params; +static OSSL_FUNC_keymgmt_settable_params_fn ed25519_settable_params; +static OSSL_FUNC_keymgmt_settable_params_fn ed448_settable_params; +static OSSL_FUNC_keymgmt_has_fn ecx_has; +static OSSL_FUNC_keymgmt_match_fn ecx_match; +static OSSL_FUNC_keymgmt_import_fn ecx_import; +static OSSL_FUNC_keymgmt_import_types_fn ecx_imexport_types; +static OSSL_FUNC_keymgmt_export_fn ecx_export; +static OSSL_FUNC_keymgmt_export_types_fn ecx_imexport_types; #define ECX_POSSIBLE_SELECTIONS (OSSL_KEYMGMT_SELECT_KEYPAIR) diff --git a/providers/implementations/keymgmt/rsa_kmgmt.c b/providers/implementations/keymgmt/rsa_kmgmt.c index f8b466a603..5c6b52efaf 100644 --- a/providers/implementations/keymgmt/rsa_kmgmt.c +++ b/providers/implementations/keymgmt/rsa_kmgmt.c @@ -25,26 +25,26 @@ #include "crypto/rsa.h" #include "internal/param_build_set.h" -static OSSL_OP_keymgmt_new_fn rsa_newdata; -static OSSL_OP_keymgmt_new_fn rsapss_newdata; -static OSSL_OP_keymgmt_gen_init_fn rsa_gen_init; -static OSSL_OP_keymgmt_gen_init_fn rsapss_gen_init; -static OSSL_OP_keymgmt_gen_set_params_fn rsa_gen_set_params; -static OSSL_OP_keymgmt_gen_settable_params_fn rsa_gen_settable_params; -static OSSL_OP_keymgmt_gen_settable_params_fn rsapss_gen_settable_params; -static OSSL_OP_keymgmt_gen_fn rsa_gen; -static OSSL_OP_keymgmt_gen_cleanup_fn rsa_gen_cleanup; -static OSSL_OP_keymgmt_free_fn rsa_freedata; -static OSSL_OP_keymgmt_get_params_fn rsa_get_params; -static OSSL_OP_keymgmt_gettable_params_fn rsa_gettable_params; -static OSSL_OP_keymgmt_has_fn rsa_has; -static OSSL_OP_keymgmt_match_fn rsa_match; -static OSSL_OP_keymgmt_validate_fn rsa_validate; -static OSSL_OP_keymgmt_import_fn rsa_import; -static OSSL_OP_keymgmt_import_types_fn rsa_import_types; -static OSSL_OP_keymgmt_export_fn rsa_export; -static OSSL_OP_keymgmt_export_types_fn rsa_export_types; -static OSSL_OP_keymgmt_query_operation_name_fn rsapss_query_operation_name; +static OSSL_FUNC_keymgmt_new_fn rsa_newdata; +static OSSL_FUNC_keymgmt_new_fn rsapss_newdata; +static OSSL_FUNC_keymgmt_gen_init_fn rsa_gen_init; +static OSSL_FUNC_keymgmt_gen_init_fn rsapss_gen_init; +static OSSL_FUNC_keymgmt_gen_set_params_fn rsa_gen_set_params; +static OSSL_FUNC_keymgmt_gen_settable_params_fn rsa_gen_settable_params; +static OSSL_FUNC_keymgmt_gen_settable_params_fn rsapss_gen_settable_params; +static OSSL_FUNC_keymgmt_gen_fn rsa_gen; +static OSSL_FUNC_keymgmt_gen_cleanup_fn rsa_gen_cleanup; +static OSSL_FUNC_keymgmt_free_fn rsa_freedata; +static OSSL_FUNC_keymgmt_get_params_fn rsa_get_params; +static OSSL_FUNC_keymgmt_gettable_params_fn rsa_gettable_params; +static OSSL_FUNC_keymgmt_has_fn rsa_has; +static OSSL_FUNC_keymgmt_match_fn rsa_match; +static OSSL_FUNC_keymgmt_validate_fn rsa_validate; +static OSSL_FUNC_keymgmt_import_fn rsa_import; +static OSSL_FUNC_keymgmt_import_types_fn rsa_import_types; +static OSSL_FUNC_keymgmt_export_fn rsa_export; +static OSSL_FUNC_keymgmt_export_types_fn rsa_export_types; +static OSSL_FUNC_keymgmt_query_operation_name_fn rsapss_query_operation_name; #define RSA_DEFAULT_MD "SHA256" #define RSA_PSS_DEFAULT_MD OSSL_DIGEST_NAME_SHA1 diff --git a/providers/implementations/macs/blake2_mac_impl.c b/providers/implementations/macs/blake2_mac_impl.c index 64d997bd50..bae00feada 100644 --- a/providers/implementations/macs/blake2_mac_impl.c +++ b/providers/implementations/macs/blake2_mac_impl.c @@ -21,16 +21,16 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn blake2_mac_new; -static OSSL_OP_mac_dupctx_fn blake2_mac_dup; -static OSSL_OP_mac_freectx_fn blake2_mac_free; -static OSSL_OP_mac_gettable_ctx_params_fn blake2_gettable_ctx_params; -static OSSL_OP_mac_get_ctx_params_fn blake2_get_ctx_params; -static OSSL_OP_mac_settable_ctx_params_fn blake2_mac_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn blake2_mac_set_ctx_params; -static OSSL_OP_mac_init_fn blake2_mac_init; -static OSSL_OP_mac_update_fn blake2_mac_update; -static OSSL_OP_mac_final_fn blake2_mac_final; +static OSSL_FUNC_mac_newctx_fn blake2_mac_new; +static OSSL_FUNC_mac_dupctx_fn blake2_mac_dup; +static OSSL_FUNC_mac_freectx_fn blake2_mac_free; +static OSSL_FUNC_mac_gettable_ctx_params_fn blake2_gettable_ctx_params; +static OSSL_FUNC_mac_get_ctx_params_fn blake2_get_ctx_params; +static OSSL_FUNC_mac_settable_ctx_params_fn blake2_mac_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn blake2_mac_set_ctx_params; +static OSSL_FUNC_mac_init_fn blake2_mac_init; +static OSSL_FUNC_mac_update_fn blake2_mac_update; +static OSSL_FUNC_mac_final_fn blake2_mac_final; struct blake2_mac_data_st { BLAKE2_CTX ctx; diff --git a/providers/implementations/macs/cmac_prov.c b/providers/implementations/macs/cmac_prov.c index 748824782f..8ae6a89ad6 100644 --- a/providers/implementations/macs/cmac_prov.c +++ b/providers/implementations/macs/cmac_prov.c @@ -29,16 +29,16 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn cmac_new; -static OSSL_OP_mac_dupctx_fn cmac_dup; -static OSSL_OP_mac_freectx_fn cmac_free; -static OSSL_OP_mac_gettable_ctx_params_fn cmac_gettable_ctx_params; -static OSSL_OP_mac_get_ctx_params_fn cmac_get_ctx_params; -static OSSL_OP_mac_settable_ctx_params_fn cmac_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn cmac_set_ctx_params; -static OSSL_OP_mac_init_fn cmac_init; -static OSSL_OP_mac_update_fn cmac_update; -static OSSL_OP_mac_final_fn cmac_final; +static OSSL_FUNC_mac_newctx_fn cmac_new; +static OSSL_FUNC_mac_dupctx_fn cmac_dup; +static OSSL_FUNC_mac_freectx_fn cmac_free; +static OSSL_FUNC_mac_gettable_ctx_params_fn cmac_gettable_ctx_params; +static OSSL_FUNC_mac_get_ctx_params_fn cmac_get_ctx_params; +static OSSL_FUNC_mac_settable_ctx_params_fn cmac_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn cmac_set_ctx_params; +static OSSL_FUNC_mac_init_fn cmac_init; +static OSSL_FUNC_mac_update_fn cmac_update; +static OSSL_FUNC_mac_final_fn cmac_final; /* local CMAC data */ diff --git a/providers/implementations/macs/gmac_prov.c b/providers/implementations/macs/gmac_prov.c index 5a0174573d..ce2173ea8b 100644 --- a/providers/implementations/macs/gmac_prov.c +++ b/providers/implementations/macs/gmac_prov.c @@ -25,16 +25,16 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn gmac_new; -static OSSL_OP_mac_dupctx_fn gmac_dup; -static OSSL_OP_mac_freectx_fn gmac_free; -static OSSL_OP_mac_gettable_params_fn gmac_gettable_params; -static OSSL_OP_mac_get_params_fn gmac_get_params; -static OSSL_OP_mac_settable_ctx_params_fn gmac_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn gmac_set_ctx_params; -static OSSL_OP_mac_init_fn gmac_init; -static OSSL_OP_mac_update_fn gmac_update; -static OSSL_OP_mac_final_fn gmac_final; +static OSSL_FUNC_mac_newctx_fn gmac_new; +static OSSL_FUNC_mac_dupctx_fn gmac_dup; +static OSSL_FUNC_mac_freectx_fn gmac_free; +static OSSL_FUNC_mac_gettable_params_fn gmac_gettable_params; +static OSSL_FUNC_mac_get_params_fn gmac_get_params; +static OSSL_FUNC_mac_settable_ctx_params_fn gmac_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn gmac_set_ctx_params; +static OSSL_FUNC_mac_init_fn gmac_init; +static OSSL_FUNC_mac_update_fn gmac_update; +static OSSL_FUNC_mac_final_fn gmac_final; /* local GMAC pkey structure */ diff --git a/providers/implementations/macs/hmac_prov.c b/providers/implementations/macs/hmac_prov.c index 6974db2944..5260995861 100644 --- a/providers/implementations/macs/hmac_prov.c +++ b/providers/implementations/macs/hmac_prov.c @@ -29,16 +29,16 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn hmac_new; -static OSSL_OP_mac_dupctx_fn hmac_dup; -static OSSL_OP_mac_freectx_fn hmac_free; -static OSSL_OP_mac_gettable_ctx_params_fn hmac_gettable_ctx_params; -static OSSL_OP_mac_get_ctx_params_fn hmac_get_ctx_params; -static OSSL_OP_mac_settable_ctx_params_fn hmac_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn hmac_set_ctx_params; -static OSSL_OP_mac_init_fn hmac_init; -static OSSL_OP_mac_update_fn hmac_update; -static OSSL_OP_mac_final_fn hmac_final; +static OSSL_FUNC_mac_newctx_fn hmac_new; +static OSSL_FUNC_mac_dupctx_fn hmac_dup; +static OSSL_FUNC_mac_freectx_fn hmac_free; +static OSSL_FUNC_mac_gettable_ctx_params_fn hmac_gettable_ctx_params; +static OSSL_FUNC_mac_get_ctx_params_fn hmac_get_ctx_params; +static OSSL_FUNC_mac_settable_ctx_params_fn hmac_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn hmac_set_ctx_params; +static OSSL_FUNC_mac_init_fn hmac_init; +static OSSL_FUNC_mac_update_fn hmac_update; +static OSSL_FUNC_mac_final_fn hmac_final; /* local HMAC context structure */ diff --git a/providers/implementations/macs/kmac_prov.c b/providers/implementations/macs/kmac_prov.c index d1ccda9b23..bc37ad34cb 100644 --- a/providers/implementations/macs/kmac_prov.c +++ b/providers/implementations/macs/kmac_prov.c @@ -64,18 +64,18 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn kmac128_new; -static OSSL_OP_mac_newctx_fn kmac256_new; -static OSSL_OP_mac_dupctx_fn kmac_dup; -static OSSL_OP_mac_freectx_fn kmac_free; -static OSSL_OP_mac_gettable_ctx_params_fn kmac_gettable_ctx_params; -static OSSL_OP_mac_get_ctx_params_fn kmac_get_ctx_params; -static OSSL_OP_mac_settable_ctx_params_fn kmac_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn kmac_set_ctx_params; -static OSSL_OP_mac_size_fn kmac_size; -static OSSL_OP_mac_init_fn kmac_init; -static OSSL_OP_mac_update_fn kmac_update; -static OSSL_OP_mac_final_fn kmac_final; +static OSSL_FUNC_mac_newctx_fn kmac128_new; +static OSSL_FUNC_mac_newctx_fn kmac256_new; +static OSSL_FUNC_mac_dupctx_fn kmac_dup; +static OSSL_FUNC_mac_freectx_fn kmac_free; +static OSSL_FUNC_mac_gettable_ctx_params_fn kmac_gettable_ctx_params; +static OSSL_FUNC_mac_get_ctx_params_fn kmac_get_ctx_params; +static OSSL_FUNC_mac_settable_ctx_params_fn kmac_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn kmac_set_ctx_params; +static OSSL_FUNC_mac_size_fn kmac_size; +static OSSL_FUNC_mac_init_fn kmac_init; +static OSSL_FUNC_mac_update_fn kmac_update; +static OSSL_FUNC_mac_final_fn kmac_final; #define KMAC_MAX_BLOCKSIZE ((1600 - 128*2) / 8) /* 168 */ #define KMAC_MIN_BLOCKSIZE ((1600 - 256*2) / 8) /* 136 */ diff --git a/providers/implementations/macs/poly1305_prov.c b/providers/implementations/macs/poly1305_prov.c index b14fc35b3e..d25b26ea3b 100644 --- a/providers/implementations/macs/poly1305_prov.c +++ b/providers/implementations/macs/poly1305_prov.c @@ -23,16 +23,16 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn poly1305_new; -static OSSL_OP_mac_dupctx_fn poly1305_dup; -static OSSL_OP_mac_freectx_fn poly1305_free; -static OSSL_OP_mac_gettable_params_fn poly1305_gettable_params; -static OSSL_OP_mac_get_params_fn poly1305_get_params; -static OSSL_OP_mac_settable_ctx_params_fn poly1305_settable_ctx_params; -static OSSL_OP_mac_set_ctx_params_fn poly1305_set_ctx_params; -static OSSL_OP_mac_init_fn poly1305_init; -static OSSL_OP_mac_update_fn poly1305_update; -static OSSL_OP_mac_final_fn poly1305_final; +static OSSL_FUNC_mac_newctx_fn poly1305_new; +static OSSL_FUNC_mac_dupctx_fn poly1305_dup; +static OSSL_FUNC_mac_freectx_fn poly1305_free; +static OSSL_FUNC_mac_gettable_params_fn poly1305_gettable_params; +static OSSL_FUNC_mac_get_params_fn poly1305_get_params; +static OSSL_FUNC_mac_settable_ctx_params_fn poly1305_settable_ctx_params; +static OSSL_FUNC_mac_set_ctx_params_fn poly1305_set_ctx_params; +static OSSL_FUNC_mac_init_fn poly1305_init; +static OSSL_FUNC_mac_update_fn poly1305_update; +static OSSL_FUNC_mac_final_fn poly1305_final; struct poly1305_data_st { void *provctx; diff --git a/providers/implementations/macs/siphash_prov.c b/providers/implementations/macs/siphash_prov.c index 4ddcb43d59..78d035d0e1 100644 --- a/providers/implementations/macs/siphash_prov.c +++ b/providers/implementations/macs/siphash_prov.c @@ -30,17 +30,17 @@ * necessary for the compiler, but provides an assurance that the signatures * of the functions in the dispatch table are correct. */ -static OSSL_OP_mac_newctx_fn siphash_new; -static OSSL_OP_mac_dupctx_fn siphash_dup; -static OSSL_OP_mac_freectx_fn siphash_free; -static OSSL_OP_mac_gettable_ctx_params_fn siphash_gettable_ctx_params; -static OSSL_OP_mac_get_ctx_params_fn siphash_get_ctx_params; -static OSSL_OP_mac_settable_ctx_params_fn siphash_settable_params; -static OSSL_OP_mac_set_ctx_params_fn siphash_set_params; -static OSSL_OP_mac_size_fn siphash_size; -static OSSL_OP_mac_init_fn siphash_init; -static OSSL_OP_mac_update_fn siphash_update; -static OSSL_OP_mac_final_fn siphash_final; +static OSSL_FUNC_mac_newctx_fn siphash_new; +static OSSL_FUNC_mac_dupctx_fn siphash_dup; +static OSSL_FUNC_mac_freectx_fn siphash_free; +static OSSL_FUNC_mac_gettable_ctx_params_fn siphash_gettable_ctx_params; +static OSSL_FUNC_mac_get_ctx_params_fn siphash_get_ctx_params; +static OSSL_FUNC_mac_settable_ctx_params_fn siphash_settable_params; +static OSSL_FUNC_mac_set_ctx_params_fn siphash_set_params; +static OSSL_FUNC_mac_size_fn siphash_size; +static OSSL_FUNC_mac_init_fn siphash_init; +static OSSL_FUNC_mac_update_fn siphash_update; +static OSSL_FUNC_mac_final_fn siphash_final; struct siphash_data_st { void *provctx; diff --git a/providers/implementations/rands/crngt.c b/providers/implementations/rands/crngt.c index 1777b33489..30a1a1088a 100644 --- a/providers/implementations/rands/crngt.c +++ b/providers/implementations/rands/crngt.c @@ -14,7 +14,7 @@ #include <string.h> #include <openssl/evp.h> -#include <openssl/core_numbers.h> +#include <openssl/core_dispatch.h> #include <openssl/params.h> #include "prov/providercommon.h" #include "prov/provider_ctx.h" diff --git a/providers/implementations/rands/drbg.c b/providers/implementations/rands/drbg.c index db8fce877a..c2fa99b865 100644 --- a/providers/implementations/rands/drbg.c +++ b/providers/implementations/rands/drbg.c @@ -889,17 +889,17 @@ PROV_DRBG *prov_rand_drbg_new /* Extract parent's functions */ drbg->parent = parent; if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_ENABLE_LOCKING)) != NULL) - drbg->parent_enable_locking = OSSL_get_OP_rand_enable_locking(pfunc); + drbg->parent_enable_locking = OSSL_FUNC_rand_enable_locking(pfunc); if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_LOCK)) != NULL) - drbg->parent_lock = OSSL_get_OP_rand_lock(pfunc); + drbg->parent_lock = OSSL_FUNC_rand_lock(pfunc); if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_UNLOCK)) != NULL) - drbg->parent_unlock = OSSL_get_OP_rand_unlock(pfunc); + drbg->parent_unlock = OSSL_FUNC_rand_unlock(pfunc); if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GET_CTX_PARAMS)) != NULL) - drbg->parent_get_ctx_params = OSSL_get_OP_rand_get_ctx_params(pfunc); + drbg->parent_get_ctx_params = OSSL_FUNC_rand_get_ctx_params(pfunc); if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_GENERATE)) != NULL) - drbg->parent_generate = OSSL_get_OP_rand_generate(pfunc); + drbg->parent_generate = OSSL_FUNC_rand_generate(pfunc); if ((pfunc = find_call(p_dispatch, OSSL_FUNC_RAND_NONCE)) != NULL) - drbg->parent_nonce = OSSL_get_OP_rand_nonce(pfunc); + drbg->parent_nonce = OSSL_FUNC_rand_nonce(pfunc); /* Set some default maximums up */ drbg->max_entropylen = DRBG_MAX_LENGTH; diff --git a/providers/implementations/rands/drbg_ctr.c b/providers/implementations/rands/drbg_ctr.c index 14f8b9fbc8..f481b1bb27 100644 --- a/providers/implementations/rands/drbg_ctr.c +++ b/providers/implementations/rands/drbg_ctr.c @@ -21,17 +21,17 @@ #include "prov/providercommonerr.h" #include "drbg_local.h" -static OSSL_OP_rand_newctx_fn drbg_ctr_new_wrapper; -static OSSL_OP_rand_freectx_fn drbg_ctr_free; -static OSSL_OP_rand_instantiate_fn drbg_ctr_instantiate_wrapper; -static OSSL_OP_rand_uninstantiate_fn drbg_ctr_uninstantiate_wrapper; -static OSSL_OP_rand_generate_fn drbg_ctr_generate_wrapper; -static OSSL_OP_rand_reseed_fn drbg_ctr_reseed_wrapper; -static OSSL_OP_rand_settable_ctx_params_fn drbg_ctr_settable_ctx_params; -static OSSL_OP_rand_set_ctx_params_fn drbg_ctr_set_ctx_params; -static OSSL_OP_rand_gettable_ctx_params_fn drbg_ctr_gettable_ctx_params; -static OSSL_OP_rand_get_ctx_params_fn drbg_ctr_get_ctx_params; -static OSSL_OP_rand_verify_zeroization_fn drbg_ctr_verify_zeroization; +static OSSL_FUNC_rand_newctx_fn drbg_ctr_new_wrapper; +static OSSL_FUNC_rand_freectx_fn drbg_ctr_free; +static OSSL_FUNC_rand_instantiate_fn drbg_ctr_instantiate_wrapper; +static OSSL_FUNC_rand_uninstantiate_fn drbg_ctr_uninstantiate_wrapper; +static OSSL_FUNC_rand_generate_fn drbg_ctr_generate_wrapper; +static OSSL_FUNC_rand_reseed_fn drbg_ctr_reseed_wrapper; +static OSSL_FUNC_rand_settable_ctx_params_fn drbg_ctr_settable_ctx_params; +static OSSL_FUNC_rand_set_ctx_params_fn drbg_ctr_set_ctx_params; +static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_ctr_gettable_ctx_params; +static OSSL_FUNC_rand_get_ctx_params_fn drbg_ctr_get_ctx_params; +static OSSL_FUNC_rand_verify_zeroization_fn drbg_ctr_verify_zeroization; /* * The state of a DRBG AES-CTR. diff --git a/providers/implementations/rands/drbg_hash.c b/providers/implementations/rands/drbg_hash.c index 62a976827a..418a641b7f 100644 --- a/providers/implementations/rands/drbg_hash.c +++ b/providers/implementations/rands/drbg_hash.c @@ -14,7 +14,7 @@ #include <openssl/crypto.h> #include <openssl/err.h> #include <openssl/rand.h> -#include <openssl/core_numbers.h> +#include <openssl/core_dispatch.h> #include "internal/thread_once.h" #include "prov/providercommon.h" #include "prov/provider_ctx.h" @@ -23,17 +23,17 @@ #include "prov/providercommonerr.h" #include "drbg_local.h" -static OSSL_OP_rand_newctx_fn drbg_hash_new_wrapper; -static OSSL_OP_rand_freectx_fn drbg_hash_free; -static OSSL_OP_rand_instantiate_fn drbg_hash_instantiate_wrapper; -static OSSL_OP_rand_uninstantiate_fn drbg_hash_uninstantiate_wrapper; -static OSSL_OP_rand_generate_fn drbg_hash_generate_wrapper; -static OSSL_OP_rand_reseed_fn drbg_hash_reseed_wrapper; -static OSSL_OP_rand_settable_ctx_params_fn drbg_hash_settable_ctx_params; -static OSSL_OP_rand_set_ctx_params_fn drbg_hash_set_ctx_params; -static OSSL_OP_rand_gettable_ctx_params_fn drbg_hash_gettable_ctx_params; -static OSSL_OP_rand_get_ctx_params_fn drbg_hash_get_ctx_params; -static OSSL_OP_rand_verify_zeroization_fn drbg_hash_verify_zeroization; +static OSSL_FUNC_rand_newctx_fn drbg_hash_new_wrapper; +static OSSL_FUNC_rand_freectx_fn drbg_hash_free; +static OSSL_FUNC_rand_instantiate_fn drbg_hash_instantiate_wrapper; +static OSSL_FUNC_rand_uninstantiate_fn drbg_hash_uninstantiate_wrapper; +static OSSL_FUNC_rand_generate_fn drbg_hash_generate_wrapper; +static OSSL_FUNC_rand_reseed_fn drbg_hash_reseed_wrapper; +static OSSL_FUNC_rand_settable_ctx_params_fn drbg_hash_settable_ctx_params; +static OSSL_FUNC_rand_set_ctx_params_fn drbg_hash_set_ctx_params; +static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_hash_gettable_ctx_params; +static OSSL_FUNC_rand_get_ctx_params_fn drbg_hash_get_ctx_params; +static OSSL_FUNC_rand_verify_zeroization_fn drbg_hash_verify_zeroization; /* 888 bits from SP800-90Ar1 10.1 table 2 */ #define HASH_PRNG_MAX_SEEDLEN (888/8) diff --git a/providers/implementations/rands/drbg_hmac.c b/providers/implementations/rands/drbg_hmac.c index dc19952439..b73fe958b0 100644 --- a/providers/implementations/rands/drbg_hmac.c +++ b/providers/implementations/rands/drbg_hmac.c @@ -20,17 +20,17 @@ #include "prov/provider_ctx.h" #include "drbg_local.h" -static OSSL_OP_rand_newctx_fn drbg_hmac_new_wrapper; -static OSSL_OP_rand_freectx_fn drbg_hmac_free; -static OSSL_OP_rand_instantiate_fn drbg_hmac_instantiate_wrapper; -static OSSL_OP_rand_uninstantiate_fn drbg_hmac_uninstantiate_wrapper; -static OSSL_OP_rand_generate_fn drbg_hmac_generate_wrapper; -static OSSL_OP_rand_reseed_fn drbg_hmac_reseed_wrapper; -static OSSL_OP_rand_settable_ctx_params_fn drbg_hmac_settable_ctx_params; -static OSSL_OP_rand_set_ctx_params_fn drbg_hmac_set_ctx_params; -static OSSL_OP_rand_gettable_ctx_params_fn drbg_hmac_gettable_ctx_params; -static OSSL_OP_rand_get_ctx_params_fn drbg_hmac_get_ctx_params; -static OSSL_OP_rand_verify_zeroization_fn drbg_hmac_verify_zeroization; +static OSSL_FUNC_rand_newctx_fn drbg_hmac_new_wrapper; +static OSSL_FUNC_rand_freectx_fn drbg_hmac_free; +static OSSL_FUNC_rand_instantiate_fn drbg_hmac_instantiate_wrapper; +static OSSL_FUNC_rand_uninstantiate_fn drbg_hmac_uninstantiate_wrapper; +static OSSL_FUNC_rand_generate_fn drbg_hmac_generate_wrapper; +static OSSL_FUNC_rand_reseed_fn drbg_hmac_reseed_wrapper; +static OSSL_FUNC_rand_settable_ctx_params_fn drbg_hmac_settable_ctx_params; +static OSSL_FUNC_rand_set_ctx_params_fn drbg_hmac_set_ctx_params; +static OSSL_FUNC_rand_gettable_ctx_params_fn drbg_hmac_gettable_ctx_params; +static OSSL_FUNC_rand_get_ctx_params_fn drbg_hmac_get_ctx_params; +static OSSL_FUNC_rand_verify_zeroization_fn drbg_hmac_verify_zeroization; typedef struct rand_drbg_hmac_st { EVP_MAC_CTX *ctx; /* H(x) = HMAC_hash OR H(x) = KMAC */ diff --git a/providers/implementations/rands/drbg_local.h b/providers/implementations/rands/drbg_local.h index d9a06c7fb8..06e2e95a69 100644 --- a/providers/implementations/rands/drbg_local.h +++ b/providers/implementations/rands/drbg_local.h @@ -11,7 +11,7 @@ # define OSSL_CRYPTO_PROV_LOCAL_H # include <openssl/evp.h> -# include <openssl/core_numbers.h> +# include <openssl/core_dispatch.h> # include <openssl/core_names.h> # include <openssl/params.h> # include "internal/tsan_assist.h" @@ -86,12 +86,12 @@ struct prov_drbg_st { /* Parent PROV_RAND and its dispatch table functions */ void *parent; - OSSL_OP_rand_enable_locking_fn *parent_enable_locking; - OSSL_OP_rand_lock_fn *parent_lock; - OSSL_OP_rand_unlock_fn *parent_unlock; - OSSL_OP_rand_get_ctx_params_fn *parent_get_ctx_params; - OSSL_OP_rand_generate_fn *parent_generate; - OSSL_OP_rand_nonce_fn *parent_nonce; + OSSL_FUNC_rand_enable_locking_fn *parent_enable_locking; + OSSL_FUNC_rand_lock_fn *parent_lock; + OSSL_FUNC_rand_unlock_fn *parent_unlock; + OSSL_FUNC_rand_get_ctx_params_fn *parent_get_ctx_params; + OSSL_FUNC_rand_generate_fn *parent_generate; + OSSL_FUNC_rand_nonce_fn *parent_nonce; const OSSL_DISPATCH *parent_dispatch; @@ -239,9 +239,9 @@ int drbg_set_callbacks(void *vctx, OSSL_INOUT_CALLBACK *get_entropy_fn, } /* locking api */ -OSSL_OP_rand_enable_locking_fn drbg_enable_locking; -OSSL_OP_rand_lock_fn drbg_lock; -OSSL_OP_rand_unlock_fn drbg_unlock; +OSSL_FUNC_rand_enable_locking_fn drbg_enable_locking; +OSSL_FUNC_rand_lock_fn drbg_lock; +OSSL_FUNC_rand_unlock_fn drbg_unlock; /* Common parameters for all of our DRBGs */ int drbg_get_ctx_params(PROV_DRBG *drbg, OSSL_PARAM params[]); diff --git a/providers/implementations/rands/test_rng.c b/providers/implementations/rands/test_rng.c index 86fb979936..7303d36f2f 100644 --- a/providers/implementations/rands/test_rng.c +++ b/providers/implementations/rands/test_rng.c @@ -8,7 +8,7 @@ */ #include <string.h> -#include <openssl/core_numbers.h> +#include <openssl/core_dispatch.h> #include <openssl/e_os2.h> #include <openssl/params.h> #include "prov/providercommon.h" @@ -17,18 +17,18 @@ #include "prov/implementations.h" #include "drbg_local.h" -static OSSL_OP_rand_newctx_fn test_rng_new_wrapper; -static OSSL_OP_rand_freectx_fn test_rng_free; -static OSSL_OP_rand_instantiate_fn test_rng_instantiate_wrapper; -static OSSL_OP_rand_uninstantiate_fn test_rng_uninstantiate_wrapper; -static OSSL_OP_rand_generate_fn test_rng_generate_wrapper; -static OSSL_OP_rand_reseed_fn test_rng_reseed_wrapper; -static OSSL_OP_rand_nonce_fn test_rng_nonce; -static OSSL_OP_rand_settable_ctx_params_fn test_rng_settable_ctx_params; -static OSSL_OP_rand_set_ctx_params_fn test_rng_set_ctx_params; -static OSSL_OP_rand_gettable_ctx_params_fn test_rng_gettable_ctx_params; -static OSSL_OP_rand_get_ctx_params_fn test_rng_get_ctx_params; -static OSSL_OP_rand_verify_zeroization_fn test_rng_verify_zeroization; +static OSSL_FUNC_rand_newctx_fn test_rng_new_wrapper; +static OSSL_FUNC_rand_freectx_fn test_rng_free; +static OSSL_FUNC_rand_instantiate_fn test_rng_instantiate_wrapper; +static OSSL_FUNC_rand_uninstantiate_fn test_rng_uninstantiate_wrapper; +static OSSL_FUNC_rand_generate_fn test_rng_generate_wrapper; +static OSSL_FUNC_rand_reseed_fn test_rng_reseed_wrapper; +static OSSL_FUNC_rand_nonce_fn test_rng_nonce; +static OSSL_FUNC_rand_settable_ctx_params_fn test_rng_settable_ctx_params; +static OSSL_FUNC_rand_set_ctx_params_fn test_rng_set_ctx_params; +static OSSL_FUNC_rand_gettable_ctx_params_fn test_rng_gettable_ctx_params; +static OSSL_FUNC_rand_get_ctx_params_fn test_rng_get_ctx_params; +static OSSL_FUNC_rand_verify_zeroization_fn test_rng_verify_zeroization; typedef struct { unsigned char *entropy, *nonce; diff --git a/providers/implementations/serializers/serializer_common.c b/providers/implementations/serializers/serializer_common.c index 75c1ddc245..7bf0ce941a 100644 --- a/providers/implementations/serializers/serializer_common.c +++ b/providers/implementations/serializers/serializer_common.c @@ -114,32 +114,32 @@ static X509_PUBKEY *ossl_prov_pubkey_from_obj(const void *obj, int obj_nid, return xpk; } -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns) +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns) { /* Pilfer the keymgmt dispatch table */ for (; fns->function_id != 0; fns++) if (fns->function_id == OSSL_FUNC_KEYMGMT_NEW) - return OSSL_get_OP_keymgmt_new(fns); + return OSSL_FUNC_keymgmt_new(fns); return NULL; } -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns) +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns) { /* Pilfer the keymgmt dispatch table */ for (; fns->function_id != 0; fns++) if (fns->function_id == OSSL_FUNC_KEYMGMT_FREE) - return OSSL_get_OP_keymgmt_free(fns); + return OSSL_FUNC_keymgmt_free(fns); return NULL; } -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns) +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns) { /* Pilfer the keymgmt dispatch table */ for (; fns->function_id != 0; fns++) if (fns->function_id == OSSL_FUNC_KEYMGMT_IMPORT) - return OSSL_get_OP_keymgmt_import(fns); + return OSSL_FUNC_keymgmt_import(fns); return NULL; } diff --git a/providers/implementations/serializers/serializer_dh.c b/providers/implementations/serializers/serializer_dh.c index df92017ba3..03bb874a64 100644 --- a/providers/implementations/serializers/serializer_dh.c +++ b/providers/implementations/serializers/serializer_dh.c @@ -21,17 +21,17 @@ #include "crypto/dh.h" #include "serializer_local.h" -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void) +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void) { return ossl_prov_get_keymgmt_new(dh_keymgmt_functions); } -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void) +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void) { return ossl_prov_get_keymgmt_free(dh_keymgmt_functions); } -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void) +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void) { return ossl_prov_get_keymgmt_import(dh_keymgmt_functions); } diff --git a/providers/implementations/serializers/serializer_dh_param.c b/providers/implementations/serializers/serializer_dh_param.c index 7254695697..49c0857734 100644 --- a/providers/implementations/serializers/serializer_dh_param.c +++ b/providers/implementations/serializers/serializer_dh_param.c @@ -24,15 +24,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dh_param_newctx; -static OSSL_OP_serializer_freectx_fn dh_param_freectx; -static OSSL_OP_serializer_serialize_data_fn dh_param_der_data; -static OSSL_OP_serializer_serialize_object_fn dh_param_der; -static OSSL_OP_serializer_serialize_data_fn dh_param_pem_data; -static OSSL_OP_serializer_serialize_object_fn dh_param_pem; +static OSSL_FUNC_serializer_newctx_fn dh_param_newctx; +static OSSL_FUNC_serializer_freectx_fn dh_param_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dh_param_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_param_der; +static OSSL_FUNC_serializer_serialize_data_fn dh_param_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_param_pem; -static OSSL_OP_serializer_serialize_data_fn dh_param_print_data; -static OSSL_OP_serializer_serialize_object_fn dh_param_print; +static OSSL_FUNC_serializer_serialize_data_fn dh_param_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_param_print; /* Parameters : context */ @@ -53,9 +53,9 @@ static int dh_param_der_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -90,9 +90,9 @@ static int dh_param_pem_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -127,9 +127,9 @@ static int dh_param_print_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { diff --git a/providers/implementations/serializers/serializer_dh_priv.c b/providers/implementations/serializers/serializer_dh_priv.c index 7badf827ea..2399052f7e 100644 --- a/providers/implementations/serializers/serializer_dh_priv.c +++ b/providers/implementations/serializers/serializer_dh_priv.c @@ -25,19 +25,19 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dh_priv_newctx; -static OSSL_OP_serializer_freectx_fn dh_priv_freectx; -static OSSL_OP_serializer_set_ctx_params_fn dh_priv_set_ctx_params; -static OSSL_OP_serializer_settable_ctx_params_fn dh_priv_settable_ctx_params; -static OSSL_OP_serializer_serialize_data_fn dh_priv_der_data; -static OSSL_OP_serializer_serialize_object_fn dh_priv_der; -static OSSL_OP_serializer_serialize_data_fn dh_pem_priv_data; -static OSSL_OP_serializer_serialize_object_fn dh_pem_priv; - -static OSSL_OP_serializer_newctx_fn dh_print_newctx; -static OSSL_OP_serializer_freectx_fn dh_print_freectx; -static OSSL_OP_serializer_serialize_data_fn dh_priv_print_data; -static OSSL_OP_serializer_serialize_object_fn dh_priv_print; +static OSSL_FUNC_serializer_newctx_fn dh_priv_newctx; +static OSSL_FUNC_serializer_freectx_fn dh_priv_freectx; +static OSSL_FUNC_serializer_set_ctx_params_fn dh_priv_set_ctx_params; +static OSSL_FUNC_serializer_settable_ctx_params_fn dh_priv_settable_ctx_params; +static OSSL_FUNC_serializer_serialize_data_fn dh_priv_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_priv_der; +static OSSL_FUNC_serializer_serialize_data_fn dh_pem_priv_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_pem_priv; + +static OSSL_FUNC_serializer_newctx_fn dh_print_newctx; +static OSSL_FUNC_serializer_freectx_fn dh_print_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dh_priv_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_priv_print; /* * Context used for private key serialization. @@ -123,9 +123,9 @@ static int dh_priv_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dh_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -168,9 +168,9 @@ static int dh_pem_priv_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dh_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -224,9 +224,9 @@ static int dh_priv_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dh_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { diff --git a/providers/implementations/serializers/serializer_dh_pub.c b/providers/implementations/serializers/serializer_dh_pub.c index 45aa2a946c..6ca79c9444 100644 --- a/providers/implementations/serializers/serializer_dh_pub.c +++ b/providers/implementations/serializers/serializer_dh_pub.c @@ -24,15 +24,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dh_pub_newctx; -static OSSL_OP_serializer_freectx_fn dh_pub_freectx; -static OSSL_OP_serializer_serialize_data_fn dh_pub_der_data; -static OSSL_OP_serializer_serialize_object_fn dh_pub_der; -static OSSL_OP_serializer_serialize_data_fn dh_pub_pem_data; -static OSSL_OP_serializer_serialize_object_fn dh_pub_pem; +static OSSL_FUNC_serializer_newctx_fn dh_pub_newctx; +static OSSL_FUNC_serializer_freectx_fn dh_pub_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dh_pub_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_pub_der; +static OSSL_FUNC_serializer_serialize_data_fn dh_pub_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_pub_pem; -static OSSL_OP_serializer_serialize_data_fn dh_pub_print_data; -static OSSL_OP_serializer_serialize_object_fn dh_pub_print; +static OSSL_FUNC_serializer_serialize_data_fn dh_pub_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dh_pub_print; /* Public key : context */ @@ -53,9 +53,9 @@ static int dh_pub_der_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -93,9 +93,9 @@ static int dh_pub_pem_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { @@ -132,9 +132,9 @@ static int dh_pub_print_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); - OSSL_OP_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); - OSSL_OP_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); + OSSL_FUNC_keymgmt_new_fn *dh_new = ossl_prov_get_keymgmt_dh_new(); + OSSL_FUNC_keymgmt_free_fn *dh_free = ossl_prov_get_keymgmt_dh_free(); + OSSL_FUNC_keymgmt_import_fn *dh_import = ossl_prov_get_keymgmt_dh_import(); int ok = 0; if (dh_import != NULL) { diff --git a/providers/implementations/serializers/serializer_dsa.c b/providers/implementations/serializers/serializer_dsa.c index dea7a18eda..4389bded99 100644 --- a/providers/implementations/serializers/serializer_dsa.c +++ b/providers/implementations/serializers/serializer_dsa.c @@ -22,17 +22,17 @@ #include "internal/ffc.h" #include "crypto/dsa.h" -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void) +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void) { return ossl_prov_get_keymgmt_new(dsa_keymgmt_functions); } -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void) +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void) { return ossl_prov_get_keymgmt_free(dsa_keymgmt_functions); } -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void) +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void) { return ossl_prov_get_keymgmt_import(dsa_keymgmt_functions); } diff --git a/providers/implementations/serializers/serializer_dsa_param.c b/providers/implementations/serializers/serializer_dsa_param.c index 40e9a7b7ae..fff577df39 100644 --- a/providers/implementations/serializers/serializer_dsa_param.c +++ b/providers/implementations/serializers/serializer_dsa_param.c @@ -24,15 +24,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dsa_param_newctx; -static OSSL_OP_serializer_freectx_fn dsa_param_freectx; -static OSSL_OP_serializer_serialize_data_fn dsa_param_der_data; -static OSSL_OP_serializer_serialize_object_fn dsa_param_der; -static OSSL_OP_serializer_serialize_data_fn dsa_param_pem_data; -static OSSL_OP_serializer_serialize_object_fn dsa_param_pem; +static OSSL_FUNC_serializer_newctx_fn dsa_param_newctx; +static OSSL_FUNC_serializer_freectx_fn dsa_param_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dsa_param_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_param_der; +static OSSL_FUNC_serializer_serialize_data_fn dsa_param_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_param_pem; -static OSSL_OP_serializer_serialize_data_fn dsa_param_print_data; -static OSSL_OP_serializer_serialize_object_fn dsa_param_print; +static OSSL_FUNC_serializer_serialize_data_fn dsa_param_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_param_print; /* Parameters : context */ @@ -53,9 +53,9 @@ static int dsa_param_der_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -91,9 +91,9 @@ static int dsa_param_pem_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -128,9 +128,9 @@ static int dsa_param_print_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { diff --git a/providers/implementations/serializers/serializer_dsa_priv.c b/providers/implementations/serializers/serializer_dsa_priv.c index 4e9f80056e..637b1126b1 100644 --- a/providers/implementations/serializers/serializer_dsa_priv.c +++ b/providers/implementations/serializers/serializer_dsa_priv.c @@ -25,19 +25,19 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dsa_priv_newctx; -static OSSL_OP_serializer_freectx_fn dsa_priv_freectx; -static OSSL_OP_serializer_set_ctx_params_fn dsa_priv_set_ctx_params; -static OSSL_OP_serializer_settable_ctx_params_fn dsa_priv_settable_ctx_params; -static OSSL_OP_serializer_serialize_data_fn dsa_priv_der_data; -static OSSL_OP_serializer_serialize_object_fn dsa_priv_der; -static OSSL_OP_serializer_serialize_data_fn dsa_pem_priv_data; -static OSSL_OP_serializer_serialize_object_fn dsa_pem_priv; - -static OSSL_OP_serializer_newctx_fn dsa_print_newctx; -static OSSL_OP_serializer_freectx_fn dsa_print_freectx; -static OSSL_OP_serializer_serialize_data_fn dsa_priv_print_data; -static OSSL_OP_serializer_serialize_object_fn dsa_priv_print; +static OSSL_FUNC_serializer_newctx_fn dsa_priv_newctx; +static OSSL_FUNC_serializer_freectx_fn dsa_priv_freectx; +static OSSL_FUNC_serializer_set_ctx_params_fn dsa_priv_set_ctx_params; +static OSSL_FUNC_serializer_settable_ctx_params_fn dsa_priv_settable_ctx_params; +static OSSL_FUNC_serializer_serialize_data_fn dsa_priv_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_priv_der; +static OSSL_FUNC_serializer_serialize_data_fn dsa_pem_priv_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_pem_priv; + +static OSSL_FUNC_serializer_newctx_fn dsa_print_newctx; +static OSSL_FUNC_serializer_freectx_fn dsa_print_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dsa_priv_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_priv_print; /* * Context used for private key serialization. @@ -123,9 +123,9 @@ static int dsa_priv_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -168,9 +168,9 @@ static int dsa_pem_priv_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -224,9 +224,9 @@ static int dsa_priv_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct dsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { diff --git a/providers/implementations/serializers/serializer_dsa_pub.c b/providers/implementations/serializers/serializer_dsa_pub.c index b47d0dd2d7..787bbb541e 100644 --- a/providers/implementations/serializers/serializer_dsa_pub.c +++ b/providers/implementations/serializers/serializer_dsa_pub.c @@ -24,15 +24,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn dsa_pub_newctx; -static OSSL_OP_serializer_freectx_fn dsa_pub_freectx; -static OSSL_OP_serializer_serialize_data_fn dsa_pub_der_data; -static OSSL_OP_serializer_serialize_object_fn dsa_pub_der; -static OSSL_OP_serializer_serialize_data_fn dsa_pub_pem_data; -static OSSL_OP_serializer_serialize_object_fn dsa_pub_pem; +static OSSL_FUNC_serializer_newctx_fn dsa_pub_newctx; +static OSSL_FUNC_serializer_freectx_fn dsa_pub_freectx; +static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_der_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_der; +static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_pem; -static OSSL_OP_serializer_serialize_data_fn dsa_pub_print_data; -static OSSL_OP_serializer_serialize_object_fn dsa_pub_print; +static OSSL_FUNC_serializer_serialize_data_fn dsa_pub_print_data; +static OSSL_FUNC_serializer_serialize_object_fn dsa_pub_print; /* Public key : context */ @@ -53,9 +53,9 @@ static int dsa_pub_der_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -104,9 +104,9 @@ static int dsa_pub_pem_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { @@ -144,9 +144,9 @@ static int dsa_pub_print_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); - OSSL_OP_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); - OSSL_OP_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); + OSSL_FUNC_keymgmt_new_fn *dsa_new = ossl_prov_get_keymgmt_dsa_new(); + OSSL_FUNC_keymgmt_free_fn *dsa_free = ossl_prov_get_keymgmt_dsa_free(); + OSSL_FUNC_keymgmt_import_fn *dsa_import = ossl_prov_get_keymgmt_dsa_import(); int ok = 0; if (dsa_import != NULL) { diff --git a/providers/implementations/serializers/serializer_ec.c b/providers/implementations/serializers/serializer_ec.c index c4ca0c08be..4d81651c5a 100644 --- a/providers/implementations/serializers/serializer_ec.c +++ b/providers/implementations/serializers/serializer_ec.c @@ -13,9 +13,9 @@ #include "prov/implementations.h" /* ec_keymgmt_functions */ #include "serializer_local.h" -void ec_get_new_free_import(OSSL_OP_keymgmt_new_fn **ec_new, - OSSL_OP_keymgmt_free_fn **ec_free, - OSSL_OP_keymgmt_import_fn **ec_import) +void ec_get_new_free_import(OSSL_FUNC_keymgmt_new_fn **ec_new, + OSSL_FUNC_keymgmt_free_fn **ec_free, + OSSL_FUNC_keymgmt_import_fn **ec_import) { *ec_new = ossl_prov_get_keymgmt_new(ec_keymgmt_functions); *ec_free = ossl_prov_get_keymgmt_free(ec_keymgmt_functions); diff --git a/providers/implementations/serializers/serializer_ec_param.c b/providers/implementations/serializers/serializer_ec_param.c index 7eda31f3a0..95fbd555a0 100644 --- a/providers/implementations/serializers/serializer_ec_param.c +++ b/providers/implementations/serializers/serializer_ec_param.c @@ -18,15 +18,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn ec_param_newctx; -static OSSL_OP_serializer_freectx_fn ec_param_freectx; -static OSSL_OP_serializer_serialize_data_fn ec_param_der_data; -static OSSL_OP_serializer_serialize_object_fn ec_param_der; -static OSSL_OP_serializer_serialize_data_fn ec_param_pem_data; -static OSSL_OP_serializer_serialize_object_fn ec_param_pem; +static OSSL_FUNC_serializer_newctx_fn ec_param_newctx; +static OSSL_FUNC_serializer_freectx_fn ec_param_freectx; +static OSSL_FUNC_serializer_serialize_data_fn ec_param_der_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_param_der; +static OSSL_FUNC_serializer_serialize_data_fn ec_param_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_param_pem; -static OSSL_OP_serializer_serialize_data_fn ec_param_print_data; -static OSSL_OP_serializer_serialize_object_fn ec_param_print; +static OSSL_FUNC_serializer_serialize_data_fn ec_param_print_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_param_print; /* There is no specific implementation context, so use the provider context */ @@ -44,9 +44,9 @@ static int ec_param_der_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -84,9 +84,9 @@ static int ec_param_pem_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -123,9 +123,9 @@ static int ec_param_print_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); diff --git a/providers/implementations/serializers/serializer_ec_priv.c b/providers/implementations/serializers/serializer_ec_priv.c index e96c08b7e7..9a315dfbcf 100644 --- a/providers/implementations/serializers/serializer_ec_priv.c +++ b/providers/implementations/serializers/serializer_ec_priv.c @@ -19,19 +19,19 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn ec_priv_newctx; -static OSSL_OP_serializer_freectx_fn ec_priv_freectx; -static OSSL_OP_serializer_set_ctx_params_fn ec_priv_set_ctx_params; -static OSSL_OP_serializer_settable_ctx_params_fn ec_priv_settable_ctx_params; -static OSSL_OP_serializer_serialize_data_fn ec_priv_der_data; -static OSSL_OP_serializer_serialize_object_fn ec_priv_der; -static OSSL_OP_serializer_serialize_data_fn ec_pem_priv_data; -static OSSL_OP_serializer_serialize_object_fn ec_pem_priv; - -static OSSL_OP_serializer_newctx_fn ec_print_newctx; -static OSSL_OP_serializer_freectx_fn ec_print_freectx; -static OSSL_OP_serializer_serialize_data_fn ec_priv_print_data; -static OSSL_OP_serializer_serialize_object_fn ec_priv_print; +static OSSL_FUNC_serializer_newctx_fn ec_priv_newctx; +static OSSL_FUNC_serializer_freectx_fn ec_priv_freectx; +static OSSL_FUNC_serializer_set_ctx_params_fn ec_priv_set_ctx_params; +static OSSL_FUNC_serializer_settable_ctx_params_fn ec_priv_settable_ctx_params; +static OSSL_FUNC_serializer_serialize_data_fn ec_priv_der_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_priv_der; +static OSSL_FUNC_serializer_serialize_data_fn ec_pem_priv_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_pem_priv; + +static OSSL_FUNC_serializer_newctx_fn ec_print_newctx; +static OSSL_FUNC_serializer_freectx_fn ec_print_freectx; +static OSSL_FUNC_serializer_serialize_data_fn ec_priv_print_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_priv_print; /* * Context used for private key serialization. @@ -117,9 +117,9 @@ static int ec_priv_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ec_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -164,9 +164,9 @@ static int ec_pem_priv_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ec_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -222,9 +222,9 @@ static int ec_priv_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ec_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); diff --git a/providers/implementations/serializers/serializer_ec_pub.c b/providers/implementations/serializers/serializer_ec_pub.c index 87e7646285..d3f67fd762 100644 --- a/providers/implementations/serializers/serializer_ec_pub.c +++ b/providers/implementations/serializers/serializer_ec_pub.c @@ -17,15 +17,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn ec_pub_newctx; -static OSSL_OP_serializer_freectx_fn ec_pub_freectx; -static OSSL_OP_serializer_serialize_data_fn ec_pub_der_data; -static OSSL_OP_serializer_serialize_object_fn ec_pub_der; -static OSSL_OP_serializer_serialize_data_fn ec_pub_pem_data; -static OSSL_OP_serializer_serialize_object_fn ec_pub_pem; +static OSSL_FUNC_serializer_newctx_fn ec_pub_newctx; +static OSSL_FUNC_serializer_freectx_fn ec_pub_freectx; +static OSSL_FUNC_serializer_serialize_data_fn ec_pub_der_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_pub_der; +static OSSL_FUNC_serializer_serialize_data_fn ec_pub_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_pub_pem; -static OSSL_OP_serializer_serialize_data_fn ec_pub_print_data; -static OSSL_OP_serializer_serialize_object_fn ec_pub_print; +static OSSL_FUNC_serializer_serialize_data_fn ec_pub_print_data; +static OSSL_FUNC_serializer_serialize_object_fn ec_pub_print; /* Public key : context */ @@ -46,9 +46,9 @@ static int ec_pub_der_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -88,9 +88,9 @@ static int ec_pub_pem_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); @@ -129,9 +129,9 @@ static int ec_pub_print_data(void *vctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *ec_new; - OSSL_OP_keymgmt_free_fn *ec_free; - OSSL_OP_keymgmt_import_fn *ec_import; + OSSL_FUNC_keymgmt_new_fn *ec_new; + OSSL_FUNC_keymgmt_free_fn *ec_free; + OSSL_FUNC_keymgmt_import_fn *ec_import; int ok = 0; ec_get_new_free_import(&ec_new, &ec_free, &ec_import); diff --git a/providers/implementations/serializers/serializer_ecx.c b/providers/implementations/serializers/serializer_ecx.c index a768355a13..ef16d97b97 100644 --- a/providers/implementations/serializers/serializer_ecx.c +++ b/providers/implementations/serializers/serializer_ecx.c @@ -14,9 +14,9 @@ #include "serializer_local.h" void ecx_get_new_free_import(ECX_KEY_TYPE type, - OSSL_OP_keymgmt_new_fn **ecx_new, - OSSL_OP_keymgmt_free_fn **ecx_free, - OSSL_OP_keymgmt_import_fn **ecx_import) + OSSL_FUNC_keymgmt_new_fn **ecx_new, + OSSL_FUNC_keymgmt_free_fn **ecx_free, + OSSL_FUNC_keymgmt_import_fn **ecx_import) { if (type == ECX_KEY_TYPE_X25519) { *ecx_new = ossl_prov_get_keymgmt_new(x25519_keymgmt_functions); diff --git a/providers/implementations/serializers/serializer_ecx_priv.c b/providers/implementations/serializers/serializer_ecx_priv.c index 0036ea6878..b74404a886 100644 --- a/providers/implementations/serializers/serializer_ecx_priv.c +++ b/providers/implementations/serializers/serializer_ecx_priv.c @@ -19,20 +19,20 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn x25519_priv_newctx; -static OSSL_OP_serializer_newctx_fn x448_priv_newctx; -static OSSL_OP_serializer_newctx_fn ed25519_priv_newctx; -static OSSL_OP_serializer_newctx_fn ed448_priv_newctx; -static OSSL_OP_serializer_freectx_fn ecx_priv_freectx; -static OSSL_OP_serializer_set_ctx_params_fn ecx_priv_set_ctx_params; -static OSSL_OP_serializer_settable_ctx_params_fn ecx_priv_settable_ctx_params; -static OSSL_OP_serializer_serialize_data_fn ecx_priv_der_data; -static OSSL_OP_serializer_serialize_object_fn ecx_priv_der; -static OSSL_OP_serializer_serialize_data_fn ecx_priv_pem_data; -static OSSL_OP_serializer_serialize_object_fn ecx_priv_pem; - -static OSSL_OP_serializer_serialize_data_fn ecx_priv_print_data; -static OSSL_OP_serializer_serialize_object_fn ecx_priv_print; +static OSSL_FUNC_serializer_newctx_fn x25519_priv_newctx; +static OSSL_FUNC_serializer_newctx_fn x448_priv_newctx; +static OSSL_FUNC_serializer_newctx_fn ed25519_priv_newctx; +static OSSL_FUNC_serializer_newctx_fn ed448_priv_newctx; +static OSSL_FUNC_serializer_freectx_fn ecx_priv_freectx; +static OSSL_FUNC_serializer_set_ctx_params_fn ecx_priv_set_ctx_params; +static OSSL_FUNC_serializer_settable_ctx_params_fn ecx_priv_settable_ctx_params; +static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_der_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_der; +static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_pem; + +static OSSL_FUNC_serializer_serialize_data_fn ecx_priv_print_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_priv_print; /* * Context used for private key serialization. @@ -140,9 +140,9 @@ static int ecx_priv_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); @@ -190,9 +190,9 @@ static int ecx_priv_pem_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); @@ -238,9 +238,9 @@ static int ecx_priv_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); diff --git a/providers/implementations/serializers/serializer_ecx_pub.c b/providers/implementations/serializers/serializer_ecx_pub.c index 3e2c7620ac..fa15e5a8c4 100644 --- a/providers/implementations/serializers/serializer_ecx_pub.c +++ b/providers/implementations/serializers/serializer_ecx_pub.c @@ -18,18 +18,18 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn x25519_pub_newctx; -static OSSL_OP_serializer_newctx_fn x448_pub_newctx; -static OSSL_OP_serializer_newctx_fn ed25519_pub_newctx; -static OSSL_OP_serializer_newctx_fn ed448_pub_newctx; -static OSSL_OP_serializer_freectx_fn ecx_pub_freectx; -static OSSL_OP_serializer_serialize_data_fn ecx_pub_der_data; -static OSSL_OP_serializer_serialize_object_fn ecx_pub_der; -static OSSL_OP_serializer_serialize_data_fn ecx_pub_pem_data; -static OSSL_OP_serializer_serialize_object_fn ecx_pub_pem; - -static OSSL_OP_serializer_serialize_data_fn ecx_pub_print_data; -static OSSL_OP_serializer_serialize_object_fn ecx_pub_print; +static OSSL_FUNC_serializer_newctx_fn x25519_pub_newctx; +static OSSL_FUNC_serializer_newctx_fn x448_pub_newctx; +static OSSL_FUNC_serializer_newctx_fn ed25519_pub_newctx; +static OSSL_FUNC_serializer_newctx_fn ed448_pub_newctx; +static OSSL_FUNC_serializer_freectx_fn ecx_pub_freectx; +static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_der_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_der; +static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_pem; + +static OSSL_FUNC_serializer_serialize_data_fn ecx_pub_print_data; +static OSSL_FUNC_serializer_serialize_object_fn ecx_pub_print; /* * Context used for public key serialization. @@ -82,9 +82,9 @@ static int ecx_pub_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_pub_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); @@ -126,9 +126,9 @@ static int ecx_pub_pem_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_pub_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); @@ -169,9 +169,9 @@ static int ecx_pub_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct ecx_pub_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *ecx_new; - OSSL_OP_keymgmt_free_fn *ecx_free; - OSSL_OP_keymgmt_import_fn *ecx_import; + OSSL_FUNC_keymgmt_new_fn *ecx_new; + OSSL_FUNC_keymgmt_free_fn *ecx_free; + OSSL_FUNC_keymgmt_import_fn *ecx_import; int ok = 0; ecx_get_new_free_import(ctx->type, &ecx_new, &ecx_free, &ecx_import); diff --git a/providers/implementations/serializers/serializer_local.h b/providers/implementations/serializers/serializer_local.h index 237e83a195..5378bf1c84 100644 --- a/providers/implementations/serializers/serializer_local.h +++ b/providers/implementations/serializers/serializer_local.h @@ -32,23 +32,23 @@ struct pkcs8_encrypt_ctx_st { void *cbarg; }; -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns); -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns); -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns); - -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void); -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void); -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void); -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void); -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void); -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void); -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void); -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void); -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void); - -void ec_get_new_free_import(OSSL_OP_keymgmt_new_fn **ec_new, - OSSL_OP_keymgmt_free_fn **ec_free, - OSSL_OP_keymgmt_import_fn **ec_import); +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_new(const OSSL_DISPATCH *fns); +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_free(const OSSL_DISPATCH *fns); +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_import(const OSSL_DISPATCH *fns); + +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void); +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void); +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void); +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dh_new(void); +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dh_free(void); +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dh_import(void); +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_dsa_new(void); +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_dsa_free(void); +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_dsa_import(void); + +void ec_get_new_free_import(OSSL_FUNC_keymgmt_new_fn **ec_new, + OSSL_FUNC_keymgmt_free_fn **ec_free, + OSSL_FUNC_keymgmt_import_fn **ec_import); int ossl_prov_prepare_ec_params(const void *eckey, int nid, void **pstr, int *pstrtype); @@ -63,9 +63,9 @@ int ossl_prov_dh_priv_to_der(const void *dh, unsigned char **pder); #ifndef OPENSSL_NO_EC void ecx_get_new_free_import(ECX_KEY_TYPE type, - OSSL_OP_keymgmt_new_fn **ecx_new, - OSSL_OP_keymgmt_free_fn **ecx_free, - OSSL_OP_keymgmt_import_fn **ecx_import); + OSSL_FUNC_keymgmt_new_fn **ecx_new, + OSSL_FUNC_keymgmt_free_fn **ecx_free, + OSSL_FUNC_keymgmt_import_fn **ecx_import); int ossl_prov_ecx_pub_to_der(const void *ecxkey, unsigned char **pder); int ossl_prov_ecx_priv_to_der(const void *ecxkey, unsigned char **pder); #endif diff --git a/providers/implementations/serializers/serializer_rsa.c b/providers/implementations/serializers/serializer_rsa.c index 7cc6027636..e936a67212 100644 --- a/providers/implementations/serializers/serializer_rsa.c +++ b/providers/implementations/serializers/serializer_rsa.c @@ -22,17 +22,17 @@ DEFINE_SPECIAL_STACK_OF_CONST(BIGNUM_const, BIGNUM) -OSSL_OP_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void) +OSSL_FUNC_keymgmt_new_fn *ossl_prov_get_keymgmt_rsa_new(void) { return ossl_prov_get_keymgmt_new(rsa_keymgmt_functions); } -OSSL_OP_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void) +OSSL_FUNC_keymgmt_free_fn *ossl_prov_get_keymgmt_rsa_free(void) { return ossl_prov_get_keymgmt_free(rsa_keymgmt_functions); } -OSSL_OP_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void) +OSSL_FUNC_keymgmt_import_fn *ossl_prov_get_keymgmt_rsa_import(void) { return ossl_prov_get_keymgmt_import(rsa_keymgmt_functions); } diff --git a/providers/implementations/serializers/serializer_rsa_priv.c b/providers/implementations/serializers/serializer_rsa_priv.c index 115a8a6d7b..c9bdfaa3fc 100644 --- a/providers/implementations/serializers/serializer_rsa_priv.c +++ b/providers/implementations/serializers/serializer_rsa_priv.c @@ -28,19 +28,19 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn rsa_priv_newctx; -static OSSL_OP_serializer_freectx_fn rsa_priv_freectx; -static OSSL_OP_serializer_set_ctx_params_fn rsa_priv_set_ctx_params; -static OSSL_OP_serializer_settable_ctx_params_fn rsa_priv_settable_ctx_params; -static OSSL_OP_serializer_serialize_data_fn rsa_priv_der_data; -static OSSL_OP_serializer_serialize_object_fn rsa_priv_der; -static OSSL_OP_serializer_serialize_data_fn rsa_pem_priv_data; -static OSSL_OP_serializer_serialize_object_fn rsa_pem_priv; - -static OSSL_OP_serializer_newctx_fn rsa_print_newctx; -static OSSL_OP_serializer_freectx_fn rsa_print_freectx; -static OSSL_OP_serializer_serialize_data_fn rsa_priv_print_data; -static OSSL_OP_serializer_serialize_object_fn rsa_priv_print; +static OSSL_FUNC_serializer_newctx_fn rsa_priv_newctx; +static OSSL_FUNC_serializer_freectx_fn rsa_priv_freectx; +static OSSL_FUNC_serializer_set_ctx_params_fn rsa_priv_set_ctx_params; +static OSSL_FUNC_serializer_settable_ctx_params_fn rsa_priv_settable_ctx_params; +static OSSL_FUNC_serializer_serialize_data_fn rsa_priv_der_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_priv_der; +static OSSL_FUNC_serializer_serialize_data_fn rsa_pem_priv_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_pem_priv; + +static OSSL_FUNC_serializer_newctx_fn rsa_print_newctx; +static OSSL_FUNC_serializer_freectx_fn rsa_print_freectx; +static OSSL_FUNC_serializer_serialize_data_fn rsa_priv_print_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_priv_print; /* * Context used for private key serialization. @@ -125,9 +125,9 @@ static int rsa_priv_der_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct rsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { @@ -171,9 +171,9 @@ static int rsa_pem_priv_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct rsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { @@ -228,9 +228,9 @@ static int rsa_priv_print_data(void *vctx, const OSSL_PARAM params[], OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { struct rsa_priv_ctx_st *ctx = vctx; - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { diff --git a/providers/implementations/serializers/serializer_rsa_pub.c b/providers/implementations/serializers/serializer_rsa_pub.c index d5da6df805..72c290ee44 100644 --- a/providers/implementations/serializers/serializer_rsa_pub.c +++ b/providers/implementations/serializers/serializer_rsa_pub.c @@ -24,15 +24,15 @@ #include "prov/provider_ctx.h" #include "serializer_local.h" -static OSSL_OP_serializer_newctx_fn rsa_pub_newctx; -static OSSL_OP_serializer_freectx_fn rsa_pub_freectx; -static OSSL_OP_serializer_serialize_data_fn rsa_pub_der_data; -static OSSL_OP_serializer_serialize_object_fn rsa_pub_der; -static OSSL_OP_serializer_serialize_data_fn rsa_pub_pem_data; -static OSSL_OP_serializer_serialize_object_fn rsa_pub_pem; +static OSSL_FUNC_serializer_newctx_fn rsa_pub_newctx; +static OSSL_FUNC_serializer_freectx_fn rsa_pub_freectx; +static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_der_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_der; +static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_pem_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_pem; -static OSSL_OP_serializer_serialize_data_fn rsa_pub_print_data; -static OSSL_OP_serializer_serialize_object_fn rsa_pub_print; +static OSSL_FUNC_serializer_serialize_data_fn rsa_pub_print_data; +static OSSL_FUNC_serializer_serialize_object_fn rsa_pub_print; /* Public key : context */ @@ -53,9 +53,9 @@ static int rsa_pub_der_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { @@ -94,9 +94,9 @@ static int rsa_pub_pem_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { @@ -134,9 +134,9 @@ static int rsa_pub_print_data(void *ctx, const OSSL_PARAM params[], OSSL_CORE_BIO *out, OSSL_PASSPHRASE_CALLBACK *cb, void *cbarg) { - OSSL_OP_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); - OSSL_OP_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); - OSSL_OP_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); + OSSL_FUNC_keymgmt_new_fn *rsa_new = ossl_prov_get_keymgmt_rsa_new(); + OSSL_FUNC_keymgmt_free_fn *rsa_free = ossl_prov_get_keymgmt_rsa_free(); + OSSL_FUNC_keymgmt_import_fn *rsa_import = ossl_prov_get_keymgmt_rsa_import(); int ok = 0; if (rsa_import != NULL) { diff --git a/providers/implementations/signature/dsa.c b/providers/implementations/signature/dsa.c index 067f9e70c7..e7a19620fa 100644 --- a/providers/implementations/signature/dsa.c +++ b/providers/implementations/signature/dsa.c @@ -33,27 +33,27 @@ #include "crypto/dsa.h" #include "prov/der_dsa.h" -static OSSL_OP_signature_newctx_fn dsa_newctx; -static OSSL_OP_signature_sign_init_fn dsa_signature_init; -static OSSL_OP_signature_verify_init_fn dsa_signature_init; -static OSSL_OP_signature_sign_fn dsa_sign; -static OSSL_OP_signature_verify_fn dsa_verify; -static OSSL_OP_signature_digest_sign_init_fn dsa_digest_signverify_init; -static OSSL_OP_signature_digest_sign_update_fn dsa_digest_signverify_update; -static OSSL_OP_signature_digest_sign_final_fn dsa_digest_sign_final; -static OSSL_OP_signature_digest_verify_init_fn dsa_digest_signverify_init; -static OSSL_OP_signature_digest_verify_update_fn dsa_digest_signverify_update; -static OSSL_OP_signature_digest_verify_final_fn dsa_digest_verify_final; -static OSSL_OP_signature_freectx_fn dsa_freectx; -static OSSL_OP_signature_dupctx_fn dsa_dupctx; -static OSSL_OP_signature_get_ctx_params_fn dsa_get_ctx_params; -static OSSL_OP_signature_gettable_ctx_params_fn dsa_gettable_ctx_params; -static OSSL_OP_signature_set_ctx_params_fn dsa_set_ctx_params; -static OSSL_OP_signature_settable_ctx_params_fn dsa_settable_ctx_params; -static OSSL_OP_signature_get_ctx_md_params_fn dsa_get_ctx_md_params; -static OSSL_OP_signature_gettable_ctx_md_params_fn dsa_gettable_ctx_md_params; -static OSSL_OP_signature_set_ctx_md_params_fn dsa_set_ctx_md_params; -static OSSL_OP_signature_settable_ctx_md_params_fn dsa_settable_ctx_md_params; +static OSSL_FUNC_signature_newctx_fn dsa_newctx; +static OSSL_FUNC_signature_sign_init_fn dsa_signature_init; +static OSSL_FUNC_signature_verify_init_fn dsa_signature_init; +static OSSL_FUNC_signature_sign_fn dsa_sign; +static OSSL_FUNC_signature_verify_fn dsa_verify; +static OSSL_FUNC_signature_digest_sign_init_fn dsa_digest_signverify_init; +static OSSL_FUNC_signature_digest_sign_update_fn dsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_sign_final_fn dsa_digest_sign_final; +static OSSL_FUNC_signature_digest_verify_init_fn dsa_digest_signverify_init; +static OSSL_FUNC_signature_digest_verify_update_fn dsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_verify_final_fn dsa_digest_verify_final; +static OSSL_FUNC_signature_freectx_fn dsa_freectx; +static OSSL_FUNC_signature_dupctx_fn dsa_dupctx; +static OSSL_FUNC_signature_get_ctx_params_fn dsa_get_ctx_params; +static OSSL_FUNC_signature_gettable_ctx_params_fn dsa_gettable_ctx_params; +static OSSL_FUNC_signature_set_ctx_params_fn dsa_set_ctx_params; +static OSSL_FUNC_signature_settable_ctx_params_fn dsa_settable_ctx_params; +static OSSL_FUNC_signature_get_ctx_md_params_fn dsa_get_ctx_md_params; +static OSSL_FUNC_signature_gettable_ctx_md_params_fn dsa_gettable_ctx_md_params; +static OSSL_FUNC_signature_set_ctx_md_params_fn dsa_set_ctx_md_params; +static OSSL_FUNC_signature_settable_ctx_md_params_fn dsa_settable_ctx_md_params; /* * What's passed as an actual key is defined by the KEYMGMT interface. diff --git a/providers/implementations/signature/ecdsa.c b/providers/implementations/signature/ecdsa.c index 7ee14ff16b..e6da05c1e1 100644 --- a/providers/implementations/signature/ecdsa.c +++ b/providers/implementations/signature/ecdsa.c @@ -30,27 +30,27 @@ #include "crypto/ec.h" #include "prov/der_ec.h" -static OSSL_OP_signature_newctx_fn ecdsa_newctx; -static OSSL_OP_signature_sign_init_fn ecdsa_signature_init; -static OSSL_OP_signature_verify_init_fn ecdsa_signature_init; -static OSSL_OP_signature_sign_fn ecdsa_sign; -static OSSL_OP_signature_verify_fn ecdsa_verify; -static OSSL_OP_signature_digest_sign_init_fn ecdsa_digest_signverify_init; -static OSSL_OP_signature_digest_sign_update_fn ecdsa_digest_signverify_update; -static OSSL_OP_signature_digest_sign_final_fn ecdsa_digest_sign_final; -static OSSL_OP_signature_digest_verify_init_fn ecdsa_digest_signverify_init; -static OSSL_OP_signature_digest_verify_update_fn ecdsa_digest_signverify_update; -static OSSL_OP_signature_digest_verify_final_fn ecdsa_digest_verify_final; -static OSSL_OP_signature_freectx_fn ecdsa_freectx; -static OSSL_OP_signature_dupctx_fn ecdsa_dupctx; -static OSSL_OP_signature_get_ctx_params_fn ecdsa_get_ctx_params; -static OSSL_OP_signature_gettable_ctx_params_fn ecdsa_gettable_ctx_params; -static OSSL_OP_signature_set_ctx_params_fn ecdsa_set_ctx_params; -static OSSL_OP_signature_settable_ctx_params_fn ecdsa_settable_ctx_params; -static OSSL_OP_signature_get_ctx_md_params_fn ecdsa_get_ctx_md_params; -static OSSL_OP_signature_gettable_ctx_md_params_fn ecdsa_gettable_ctx_md_params; -static OSSL_OP_signature_set_ctx_md_params_fn ecdsa_set_ctx_md_params; -static OSSL_OP_signature_settable_ctx_md_params_fn ecdsa_settable_ctx_md_params; +static OSSL_FUNC_signature_newctx_fn ecdsa_newctx; +static OSSL_FUNC_signature_sign_init_fn ecdsa_signature_init; +static OSSL_FUNC_signature_verify_init_fn ecdsa_signature_init; +static OSSL_FUNC_signature_sign_fn ecdsa_sign; +static OSSL_FUNC_signature_verify_fn ecdsa_verify; +static OSSL_FUNC_signature_digest_sign_init_fn ecdsa_digest_signverify_init; +static OSSL_FUNC_signature_digest_sign_update_fn ecdsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_sign_final_fn ecdsa_digest_sign_final; +static OSSL_FUNC_signature_digest_verify_init_fn ecdsa_digest_signverify_init; +static OSSL_FUNC_signature_digest_verify_update_fn ecdsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_verify_final_fn ecdsa_digest_verify_final; +static OSSL_FUNC_signature_freectx_fn ecdsa_freectx; +static OSSL_FUNC_signature_dupctx_fn ecdsa_dupctx; +static OSSL_FUNC_signature_get_ctx_params_fn ecdsa_get_ctx_params; +static OSSL_FUNC_signature_gettable_ctx_params_fn ecdsa_gettable_ctx_params; +static OSSL_FUNC_signature_set_ctx_params_fn ecdsa_set_ctx_params; +static OSSL_FUNC_signature_settable_ctx_params_fn ecdsa_settable_ctx_params; +static OSSL_FUNC_signature_get_ctx_md_params_fn ecdsa_get_ctx_md_params; +static OSSL_FUNC_signature_gettable_ctx_md_params_fn ecdsa_gettable_ctx_md_params; +static OSSL_FUNC_signature_set_ctx_md_params_fn ecdsa_set_ctx_md_params; +static OSSL_FUNC_signature_settable_ctx_md_params_fn ecdsa_settable_ctx_md_params; /* * What's passed as an actual key is defined by the KEYMGMT interface. diff --git a/providers/implementations/signature/eddsa.c b/providers/implementations/signature/eddsa.c index 9a7188ef7e..c8e6c7cd3c 100644 --- a/providers/implementations/signature/eddsa.c +++ b/providers/implementations/signature/eddsa.c @@ -22,14 +22,14 @@ #include "prov/provider_ctx.h" #include "crypto/ecx.h" -static OSSL_OP_signature_newctx_fn eddsa_newctx; -static OSSL_OP_signature_digest_sign_init_fn eddsa_digest_signverify_init; -static OSSL_OP_signature_digest_sign_fn ed25519_digest_sign; -static OSSL_OP_signature_digest_sign_fn ed448_digest_sign; -static OSSL_OP_signature_digest_verify_fn ed25519_digest_verify; -static OSSL_OP_signature_digest_verify_fn ed448_digest_verify; -static OSSL_OP_signature_freectx_fn eddsa_freectx; -static OSSL_OP_signature_dupctx_fn eddsa_dupctx; +static OSSL_FUNC_signature_newctx_fn eddsa_newctx; +static OSSL_FUNC_signature_digest_sign_init_fn eddsa_digest_signverify_init; +static OSSL_FUNC_signature_digest_sign_fn ed25519_digest_sign; +static OSSL_FUNC_signature_digest_sign_fn ed448_digest_sign; +static OSSL_FUNC_signature_digest_verify_fn ed25519_digest_verify; +static OSSL_FUNC_signature_digest_verify_fn ed448_digest_verify; +static OSSL_FUNC_signature_freectx_fn eddsa_freectx; +static OSSL_FUNC_signature_dupctx_fn eddsa_dupctx; typedef struct { OPENSSL_CTX *libctx; diff --git a/providers/implementations/signature/rsa.c b/providers/implementations/signature/rsa.c index 49334e5cf0..42654f929a 100644 --- a/providers/implementations/signature/rsa.c +++ b/providers/implementations/signature/rsa.c @@ -30,29 +30,29 @@ #include "prov/provider_ctx.h" #include "prov/der_rsa.h" -static OSSL_OP_signature_newctx_fn rsa_newctx; -static OSSL_OP_signature_sign_init_fn rsa_sign_init; -static OSSL_OP_signature_verify_init_fn rsa_verify_init; -static OSSL_OP_signature_verify_recover_init_fn rsa_verify_recover_init; -static OSSL_OP_signature_sign_fn rsa_sign; -static OSSL_OP_signature_verify_fn rsa_verify; -static OSSL_OP_signature_verify_recover_fn rsa_verify_recover; -static OSSL_OP_signature_digest_sign_init_fn rsa_digest_sign_init; -static OSSL_OP_signature_digest_sign_update_fn rsa_digest_signverify_update; -static OSSL_OP_signature_digest_sign_final_fn rsa_digest_sign_final; -static OSSL_OP_signature_digest_verify_init_fn rsa_digest_verify_init; -static OSSL_OP_signature_digest_verify_update_fn rsa_digest_signverify_update; -static OSSL_OP_signature_digest_verify_final_fn rsa_digest_verify_final; -static OSSL_OP_signature_freectx_fn rsa_freectx; -static OSSL_OP_signature_dupctx_fn rsa_dupctx; -static OSSL_OP_signature_get_ctx_params_fn rsa_get_ctx_params; -static OSSL_OP_signature_gettable_ctx_params_fn rsa_gettable_ctx_params; -static OSSL_OP_signature_set_ctx_params_fn rsa_set_ctx_params; -static OSSL_OP_signature_settable_ctx_params_fn rsa_settable_ctx_params; -static OSSL_OP_signature_get_ctx_md_params_fn rsa_get_ctx_md_params; -static OSSL_OP_signature_gettable_ctx_md_params_fn rsa_gettable_ctx_md_params; -static OSSL_OP_signature_set_ctx_md_params_fn rsa_set_ctx_md_params; -static OSSL_OP_signature_settable_ctx_md_params_fn rsa_settable_ctx_md_params; +static OSSL_FUNC_signature_newctx_fn rsa_newctx; +static OSSL_FUNC_signature_sign_init_fn rsa_sign_init; +static OSSL_FUNC_signature_verify_init_fn rsa_verify_init; +static OSSL_FUNC_signature_verify_recover_init_fn rsa_verify_recover_init; +static OSSL_FUNC_signature_sign_fn rsa_sign; +static OSSL_FUNC_signature_verify_fn rsa_verify; +static OSSL_FUNC_signature_verify_recover_fn rsa_verify_recover; +static OSSL_FUNC_signature_digest_sign_init_fn rsa_digest_sign_init; +static OSSL_FUNC_signature_digest_sign_update_fn rsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_sign_final_fn rsa_digest_sign_final; +static OSSL_FUNC_signature_digest_verify_init_fn rsa_digest_verify_init; +static OSSL_FUNC_signature_digest_verify_update_fn rsa_digest_signverify_update; +static OSSL_FUNC_signature_digest_verify_final_fn rsa_digest_verify_final; +static OSSL_FUNC_signature_freectx_fn rsa_freectx; +static OSSL_FUNC_signature_dupctx_fn rsa_dupctx; +static OSSL_FUNC_signature_get_ctx_params_fn rsa_get_ctx_params; +static OSSL_FUNC_signature_gettable_ctx_params_fn rsa_gettable_ctx_params; +static OSSL_FUNC_signature_set_ctx_params_fn rsa_set_ctx_params; +static OSSL_FUNC_signature_settable_ctx_params_fn rsa_settable_ctx_params; +static OSSL_FUNC_signature_get_ctx_md_params_fn rsa_get_ctx_md_params; +static OSSL_FUNC_signature_gettable_ctx_md_params_fn rsa_gettable_ctx_md_params; +static OSSL_FUNC_signature_set_ctx_md_params_fn rsa_set_ctx_md_params; +static OSSL_FUNC_signature_settable_ctx_md_params_fn rsa_settable_ctx_md_params; static OSSL_ITEM padding_item[] = { { RSA_PKCS1_PADDING, OSSL_PKEY_RSA_PAD_MODE_PKCSV15 }, 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: |