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 /crypto | |
parent | 23c48d94d4d34eedc15fa65e0fa0e38a6137e09f (diff) |
Make the naming scheme for dispatched functions more consistent
The new naming scheme consistently usese the `OSSL_FUNC_` prefix for all
functions which are dispatched between the core and providers.
This change includes in particular all up- and downcalls, i.e., the
dispatched functions passed from core to provider and vice versa.
- OSSL_core_ -> OSSL_FUNC_core_
- OSSL_provider_ -> OSSL_FUNC_core_
For operations and their function dispatch tables, the following convention
is used:
Type | Name (evp_generic_fetch(3)) |
---------------------|-----------------------------------|
operation | OSSL_OP_FOO |
function id | OSSL_FUNC_FOO_FUNCTION_NAME |
function "name" | OSSL_FUNC_foo_function_name |
function typedef | OSSL_FUNC_foo_function_name_fn |
function ptr getter | OSSL_FUNC_foo_function_name |
Reviewed-by: Richard Levitte <levitte@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/12222)
Diffstat (limited to 'crypto')
-rw-r--r-- | crypto/evp/digest.c | 26 | ||||
-rw-r--r-- | crypto/evp/evp_enc.c | 28 | ||||
-rw-r--r-- | crypto/evp/evp_local.h | 170 | ||||
-rw-r--r-- | crypto/evp/evp_rand.c | 36 | ||||
-rw-r--r-- | crypto/evp/exchange.c | 20 | ||||
-rw-r--r-- | crypto/evp/kdf_meth.c | 22 | ||||
-rw-r--r-- | crypto/evp/keymgmt_meth.c | 42 | ||||
-rw-r--r-- | crypto/evp/mac_meth.c | 24 | ||||
-rw-r--r-- | crypto/evp/pmeth_fn.c | 22 | ||||
-rw-r--r-- | crypto/evp/signature.c | 50 | ||||
-rw-r--r-- | crypto/initthread.c | 2 | ||||
-rw-r--r-- | crypto/provider_core.c | 44 | ||||
-rw-r--r-- | crypto/serializer/serializer_local.h | 12 | ||||
-rw-r--r-- | crypto/serializer/serializer_meth.c | 12 |
14 files changed, 255 insertions, 255 deletions
diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 91baa0d45c..92e9b7bfb0 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -781,68 +781,68 @@ static void *evp_md_from_dispatch(int name_id, switch (fns->function_id) { case OSSL_FUNC_DIGEST_NEWCTX: if (md->newctx == NULL) { - md->newctx = OSSL_get_OP_digest_newctx(fns); + md->newctx = OSSL_FUNC_digest_newctx(fns); fncnt++; } break; case OSSL_FUNC_DIGEST_INIT: if (md->dinit == NULL) { - md->dinit = OSSL_get_OP_digest_init(fns); + md->dinit = OSSL_FUNC_digest_init(fns); fncnt++; } break; case OSSL_FUNC_DIGEST_UPDATE: if (md->dupdate == NULL) { - md->dupdate = OSSL_get_OP_digest_update(fns); + md->dupdate = OSSL_FUNC_digest_update(fns); fncnt++; } break; case OSSL_FUNC_DIGEST_FINAL: if (md->dfinal == NULL) { - md->dfinal = OSSL_get_OP_digest_final(fns); + md->dfinal = OSSL_FUNC_digest_final(fns); fncnt++; } break; case OSSL_FUNC_DIGEST_DIGEST: if (md->digest == NULL) - md->digest = OSSL_get_OP_digest_digest(fns); + md->digest = OSSL_FUNC_digest_digest(fns); /* We don't increment fnct for this as it is stand alone */ break; case OSSL_FUNC_DIGEST_FREECTX: if (md->freectx == NULL) { - md->freectx = OSSL_get_OP_digest_freectx(fns); + md->freectx = OSSL_FUNC_digest_freectx(fns); fncnt++; } break; case OSSL_FUNC_DIGEST_DUPCTX: if (md->dupctx == NULL) - md->dupctx = OSSL_get_OP_digest_dupctx(fns); + md->dupctx = OSSL_FUNC_digest_dupctx(fns); break; case OSSL_FUNC_DIGEST_GET_PARAMS: if (md->get_params == NULL) - md->get_params = OSSL_get_OP_digest_get_params(fns); + md->get_params = OSSL_FUNC_digest_get_params(fns); break; case OSSL_FUNC_DIGEST_SET_CTX_PARAMS: if (md->set_ctx_params == NULL) - md->set_ctx_params = OSSL_get_OP_digest_set_ctx_params(fns); + md->set_ctx_params = OSSL_FUNC_digest_set_ctx_params(fns); break; case OSSL_FUNC_DIGEST_GET_CTX_PARAMS: if (md->get_ctx_params == NULL) - md->get_ctx_params = OSSL_get_OP_digest_get_ctx_params(fns); + md->get_ctx_params = OSSL_FUNC_digest_get_ctx_params(fns); break; case OSSL_FUNC_DIGEST_GETTABLE_PARAMS: if (md->gettable_params == NULL) - md->gettable_params = OSSL_get_OP_digest_gettable_params(fns); + md->gettable_params = OSSL_FUNC_digest_gettable_params(fns); break; case OSSL_FUNC_DIGEST_SETTABLE_CTX_PARAMS: if (md->settable_ctx_params == NULL) md->settable_ctx_params = - OSSL_get_OP_digest_settable_ctx_params(fns); + OSSL_FUNC_digest_settable_ctx_params(fns); break; case OSSL_FUNC_DIGEST_GETTABLE_CTX_PARAMS: if (md->gettable_ctx_params == NULL) md->gettable_ctx_params = - OSSL_get_OP_digest_gettable_ctx_params(fns); + OSSL_FUNC_digest_gettable_ctx_params(fns); break; } } diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 0f6fbb64ec..ec966a0ed5 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -1336,80 +1336,80 @@ static void *evp_cipher_from_dispatch(const int name_id, case OSSL_FUNC_CIPHER_NEWCTX: if (cipher->newctx != NULL) break; - cipher->newctx = OSSL_get_OP_cipher_newctx(fns); + cipher->newctx = OSSL_FUNC_cipher_newctx(fns); fnctxcnt++; break; case OSSL_FUNC_CIPHER_ENCRYPT_INIT: if (cipher->einit != NULL) break; - cipher->einit = OSSL_get_OP_cipher_encrypt_init(fns); + cipher->einit = OSSL_FUNC_cipher_encrypt_init(fns); fnciphcnt++; break; case OSSL_FUNC_CIPHER_DECRYPT_INIT: if (cipher->dinit != NULL) break; - cipher->dinit = OSSL_get_OP_cipher_decrypt_init(fns); + cipher->dinit = OSSL_FUNC_cipher_decrypt_init(fns); fnciphcnt++; break; case OSSL_FUNC_CIPHER_UPDATE: if (cipher->cupdate != NULL) break; - cipher->cupdate = OSSL_get_OP_cipher_update(fns); + cipher->cupdate = OSSL_FUNC_cipher_update(fns); fnciphcnt++; break; case OSSL_FUNC_CIPHER_FINAL: if (cipher->cfinal != NULL) break; - cipher->cfinal = OSSL_get_OP_cipher_final(fns); + cipher->cfinal = OSSL_FUNC_cipher_final(fns); fnciphcnt++; break; case OSSL_FUNC_CIPHER_CIPHER: if (cipher->ccipher != NULL) break; - cipher->ccipher = OSSL_get_OP_cipher_cipher(fns); + cipher->ccipher = OSSL_FUNC_cipher_cipher(fns); break; case OSSL_FUNC_CIPHER_FREECTX: if (cipher->freectx != NULL) break; - cipher->freectx = OSSL_get_OP_cipher_freectx(fns); + cipher->freectx = OSSL_FUNC_cipher_freectx(fns); fnctxcnt++; break; case OSSL_FUNC_CIPHER_DUPCTX: if (cipher->dupctx != NULL) break; - cipher->dupctx = OSSL_get_OP_cipher_dupctx(fns); + cipher->dupctx = OSSL_FUNC_cipher_dupctx(fns); break; case OSSL_FUNC_CIPHER_GET_PARAMS: if (cipher->get_params != NULL) break; - cipher->get_params = OSSL_get_OP_cipher_get_params(fns); + cipher->get_params = OSSL_FUNC_cipher_get_params(fns); break; case OSSL_FUNC_CIPHER_GET_CTX_PARAMS: if (cipher->get_ctx_params != NULL) break; - cipher->get_ctx_params = OSSL_get_OP_cipher_get_ctx_params(fns); + cipher->get_ctx_params = OSSL_FUNC_cipher_get_ctx_params(fns); break; case OSSL_FUNC_CIPHER_SET_CTX_PARAMS: if (cipher->set_ctx_params != NULL) break; - cipher->set_ctx_params = OSSL_get_OP_cipher_set_ctx_params(fns); + cipher->set_ctx_params = OSSL_FUNC_cipher_set_ctx_params(fns); break; case OSSL_FUNC_CIPHER_GETTABLE_PARAMS: if (cipher->gettable_params != NULL) break; - cipher->gettable_params = OSSL_get_OP_cipher_gettable_params(fns); + cipher->gettable_params = OSSL_FUNC_cipher_gettable_params(fns); break; case OSSL_FUNC_CIPHER_GETTABLE_CTX_PARAMS: if (cipher->gettable_ctx_params != NULL) break; cipher->gettable_ctx_params = - OSSL_get_OP_cipher_gettable_ctx_params(fns); + OSSL_FUNC_cipher_gettable_ctx_params(fns); break; case OSSL_FUNC_CIPHER_SETTABLE_CTX_PARAMS: if (cipher->settable_ctx_params != NULL) break; cipher->settable_ctx_params = - OSSL_get_OP_cipher_settable_ctx_params(fns); + OSSL_FUNC_cipher_settable_ctx_params(fns); break; } } diff --git a/crypto/evp/evp_local.h b/crypto/evp/evp_local.h index 4138ad8d95..aeb4cca266 100644 --- a/crypto/evp/evp_local.h +++ b/crypto/evp/evp_local.h @@ -83,24 +83,24 @@ struct evp_rand_st { CRYPTO_RWLOCK *refcnt_lock; const OSSL_DISPATCH *dispatch; - OSSL_OP_rand_newctx_fn *newctx; - OSSL_OP_rand_freectx_fn *freectx; - OSSL_OP_rand_instantiate_fn *instantiate; - OSSL_OP_rand_uninstantiate_fn *uninstantiate; - OSSL_OP_rand_generate_fn *generate; - OSSL_OP_rand_reseed_fn *reseed; - OSSL_OP_rand_nonce_fn *nonce; - OSSL_OP_rand_enable_locking_fn *enable_locking; - OSSL_OP_rand_lock_fn *lock; - OSSL_OP_rand_unlock_fn *unlock; - OSSL_OP_rand_gettable_params_fn *gettable_params; - OSSL_OP_rand_gettable_ctx_params_fn *gettable_ctx_params; - OSSL_OP_rand_settable_ctx_params_fn *settable_ctx_params; - OSSL_OP_rand_get_params_fn *get_params; - OSSL_OP_rand_get_ctx_params_fn *get_ctx_params; - OSSL_OP_rand_set_ctx_params_fn *set_ctx_params; - OSSL_OP_rand_set_callbacks_fn *set_callbacks; - OSSL_OP_rand_verify_zeroization_fn *verify_zeroization; + OSSL_FUNC_rand_newctx_fn *newctx; + OSSL_FUNC_rand_freectx_fn *freectx; + OSSL_FUNC_rand_instantiate_fn *instantiate; + OSSL_FUNC_rand_uninstantiate_fn *uninstantiate; + OSSL_FUNC_rand_generate_fn *generate; + OSSL_FUNC_rand_reseed_fn *reseed; + OSSL_FUNC_rand_nonce_fn *nonce; + OSSL_FUNC_rand_enable_locking_fn *enable_locking; + OSSL_FUNC_rand_lock_fn *lock; + OSSL_FUNC_rand_unlock_fn *unlock; + OSSL_FUNC_rand_gettable_params_fn *gettable_params; + OSSL_FUNC_rand_gettable_ctx_params_fn *gettable_ctx_params; + OSSL_FUNC_rand_settable_ctx_params_fn *settable_ctx_params; + OSSL_FUNC_rand_get_params_fn *get_params; + OSSL_FUNC_rand_get_ctx_params_fn *get_ctx_params; + OSSL_FUNC_rand_set_ctx_params_fn *set_ctx_params; + OSSL_FUNC_rand_set_callbacks_fn *set_callbacks; + OSSL_FUNC_rand_verify_zeroization_fn *verify_zeroization; } /* EVP_RAND */ ; struct evp_keymgmt_st { @@ -112,33 +112,33 @@ struct evp_keymgmt_st { CRYPTO_RWLOCK *lock; /* Constructor(s), destructor, information */ - OSSL_OP_keymgmt_new_fn *new; - OSSL_OP_keymgmt_free_fn *free; - OSSL_OP_keymgmt_get_params_fn *get_params; - OSSL_OP_keymgmt_gettable_params_fn *gettable_params; - OSSL_OP_keymgmt_set_params_fn *set_params; - OSSL_OP_keymgmt_settable_params_fn *settable_params; + OSSL_FUNC_keymgmt_new_fn *new; + OSSL_FUNC_keymgmt_free_fn *free; + OSSL_FUNC_keymgmt_get_params_fn *get_params; + OSSL_FUNC_keymgmt_gettable_params_fn *gettable_params; + OSSL_FUNC_keymgmt_set_params_fn *set_params; + OSSL_FUNC_keymgmt_settable_params_fn *settable_params; /* Generation, a complex constructor */ - OSSL_OP_keymgmt_gen_init_fn *gen_init; - OSSL_OP_keymgmt_gen_set_template_fn *gen_set_template; - OSSL_OP_keymgmt_gen_set_params_fn *gen_set_params; - OSSL_OP_keymgmt_gen_settable_params_fn *gen_settable_params; - OSSL_OP_keymgmt_gen_fn *gen; - OSSL_OP_keymgmt_gen_cleanup_fn *gen_cleanup; + OSSL_FUNC_keymgmt_gen_init_fn *gen_init; + OSSL_FUNC_keymgmt_gen_set_template_fn *gen_set_template; + OSSL_FUNC_keymgmt_gen_set_params_fn *gen_set_params; + OSSL_FUNC_keymgmt_gen_settable_params_fn *gen_settable_params; + OSSL_FUNC_keymgmt_gen_fn *gen; + OSSL_FUNC_keymgmt_gen_cleanup_fn *gen_cleanup; /* Key object checking */ - OSSL_OP_keymgmt_query_operation_name_fn *query_operation_name; - OSSL_OP_keymgmt_has_fn *has; - OSSL_OP_keymgmt_validate_fn *validate; - OSSL_OP_keymgmt_match_fn *match; + OSSL_FUNC_keymgmt_query_operation_name_fn *query_operation_name; + OSSL_FUNC_keymgmt_has_fn *has; + OSSL_FUNC_keymgmt_validate_fn *validate; + OSSL_FUNC_keymgmt_match_fn *match; /* Import and export routines */ - OSSL_OP_keymgmt_import_fn *import; - OSSL_OP_keymgmt_import_types_fn *import_types; - OSSL_OP_keymgmt_export_fn *export; - OSSL_OP_keymgmt_export_types_fn *export_types; - OSSL_OP_keymgmt_copy_fn *copy; + OSSL_FUNC_keymgmt_import_fn *import; + OSSL_FUNC_keymgmt_import_types_fn *import_types; + OSSL_FUNC_keymgmt_export_fn *export; + OSSL_FUNC_keymgmt_export_types_fn *export_types; + OSSL_FUNC_keymgmt_copy_fn *copy; } /* EVP_KEYMGMT */ ; struct evp_keyexch_st { @@ -147,16 +147,16 @@ struct evp_keyexch_st { CRYPTO_REF_COUNT refcnt; CRYPTO_RWLOCK *lock; - OSSL_OP_keyexch_newctx_fn *newctx; - OSSL_OP_keyexch_init_fn *init; - OSSL_OP_keyexch_set_peer_fn *set_peer; - OSSL_OP_keyexch_derive_fn *derive; - OSSL_OP_keyexch_freectx_fn *freectx; - OSSL_OP_keyexch_dupctx_fn *dupctx; - OSSL_OP_keyexch_set_ctx_params_fn *set_ctx_params; - OSSL_OP_keyexch_settable_ctx_params_fn *settable_ctx_params; - OSSL_OP_keyexch_get_ctx_params_fn *get_ctx_params; - OSSL_OP_keyexch_gettable_ctx_params_fn *gettable_ctx_params; + OSSL_FUNC_keyexch_newctx_fn *newctx; + OSSL_FUNC_keyexch_init_fn *init; + OSSL_FUNC_keyexch_set_peer_fn *set_peer; + OSSL_FUNC_keyexch_derive_fn *derive; + OSSL_FUNC_keyexch_freectx_fn *freectx; + OSSL_FUNC_keyexch_dupctx_fn *dupctx; + OSSL_FUNC_keyexch_set_ctx_params_fn *set_ctx_params; + OSSL_FUNC_keyexch_settable_ctx_params_fn *settable_ctx_params; + OSSL_FUNC_keyexch_get_ctx_params_fn *get_ctx_params; + OSSL_FUNC_keyexch_gettable_ctx_params_fn *gettable_ctx_params; } /* EVP_KEYEXCH */; struct evp_signature_st { @@ -165,31 +165,31 @@ struct evp_signature_st { CRYPTO_REF_COUNT refcnt; CRYPTO_RWLOCK *lock; - OSSL_OP_signature_newctx_fn *newctx; - OSSL_OP_signature_sign_init_fn *sign_init; - OSSL_OP_signature_sign_fn *sign; - OSSL_OP_signature_verify_init_fn *verify_init; - OSSL_OP_signature_verify_fn *verify; - OSSL_OP_signature_verify_recover_init_fn *verify_recover_init; - OSSL_OP_signature_verify_recover_fn *verify_recover; - OSSL_OP_signature_digest_sign_init_fn *digest_sign_init; - OSSL_OP_signature_digest_sign_update_fn *digest_sign_update; - OSSL_OP_signature_digest_sign_final_fn *digest_sign_final; - OSSL_OP_signature_digest_sign_fn *digest_sign; - OSSL_OP_signature_digest_verify_init_fn *digest_verify_init; - OSSL_OP_signature_digest_verify_update_fn *digest_verify_update; - OSSL_OP_signature_digest_verify_final_fn *digest_verify_final; - OSSL_OP_signature_digest_verify_fn *digest_verify; - OSSL_OP_signature_freectx_fn *freectx; - OSSL_OP_signature_dupctx_fn *dupctx; - OSSL_OP_signature_get_ctx_params_fn *get_ctx_params; - OSSL_OP_signature_gettable_ctx_params_fn *gettable_ctx_params; - OSSL_OP_signature_set_ctx_params_fn *set_ctx_params; - OSSL_OP_signature_settable_ctx_params_fn *settable_ctx_params; - OSSL_OP_signature_get_ctx_md_params_fn *get_ctx_md_params; - OSSL_OP_signature_gettable_ctx_md_params_fn *gettable_ctx_md_params; - OSSL_OP_signature_set_ctx_md_params_fn *set_ctx_md_params; - OSSL_OP_signature_settable_ctx_md_params_fn *settable_ctx_md_params; + OSSL_FUNC_signature_newctx_fn *newctx; + OSSL_FUNC_signature_sign_init_fn *sign_init; + OSSL_FUNC_signature_sign_fn *sign; + OSSL_FUNC_signature_verify_init_fn *verify_init; + OSSL_FUNC_signature_verify_fn *verify; + OSSL_FUNC_signature_verify_recover_init_fn *verify_recover_init; + OSSL_FUNC_signature_verify_recover_fn *verify_recover; + OSSL_FUNC_signature_digest_sign_init_fn *digest_sign_init; + OSSL_FUNC_signature_digest_sign_update_fn *digest_sign_update; + OSSL_FUNC_signature_digest_sign_final_fn *digest_sign_final; + OSSL_FUNC_signature_digest_sign_fn *digest_sign; + OSSL_FUNC_signature_digest_verify_init_fn *digest_verify_init; + OSSL_FUNC_signature_digest_verify_update_fn *digest_verify_update; + OSSL_FUNC_signature_digest_verify_final_fn *digest_verify_final; + OSSL_FUNC_signature_digest_verify_fn *digest_verify; + OSSL_FUNC_signature_freectx_fn *freectx; + OSSL_FUNC_signature_dupctx_fn *dupctx; + OSSL_FUNC_signature_get_ctx_params_fn *get_ctx_params; + OSSL_FUNC_signature_gettable_ctx_params_fn *gettable_ctx_params; + OSSL_FUNC_signature_set_ctx_params_fn *set_ctx_params; + OSSL_FUNC_signature_settable_ctx_params_fn *settable_ctx_params; + OSSL_FUNC_signature_get_ctx_md_params_fn *get_ctx_md_params; + OSSL_FUNC_signature_gettable_ctx_md_params_fn *gettable_ctx_md_params; + OSSL_FUNC_signature_set_ctx_md_params_fn *set_ctx_md_params; + OSSL_FUNC_signature_settable_ctx_md_params_fn *settable_ctx_md_params; } /* EVP_SIGNATURE */; struct evp_asym_cipher_st { @@ -198,17 +198,17 @@ struct evp_asym_cipher_st { CRYPTO_REF_COUNT refcnt; CRYPTO_RWLOCK *lock; - OSSL_OP_asym_cipher_newctx_fn *newctx; - OSSL_OP_asym_cipher_encrypt_init_fn *encrypt_init; - OSSL_OP_asym_cipher_encrypt_fn *encrypt; - OSSL_OP_asym_cipher_decrypt_init_fn *decrypt_init; - OSSL_OP_asym_cipher_decrypt_fn *decrypt; - OSSL_OP_asym_cipher_freectx_fn *freectx; - OSSL_OP_asym_cipher_dupctx_fn *dupctx; - OSSL_OP_asym_cipher_get_ctx_params_fn *get_ctx_params; - OSSL_OP_asym_cipher_gettable_ctx_params_fn *gettable_ctx_params; - OSSL_OP_asym_cipher_set_ctx_params_fn *set_ctx_params; - OSSL_OP_asym_cipher_settable_ctx_params_fn *settable_ctx_params; + OSSL_FUNC_asym_cipher_newctx_fn *newctx; + OSSL_FUNC_asym_cipher_encrypt_init_fn *encrypt_init; + OSSL_FUNC_asym_cipher_encrypt_fn *encrypt; + OSSL_FUNC_asym_cipher_decrypt_init_fn *decrypt_init; + OSSL_FUNC_asym_cipher_decrypt_fn *decrypt; + OSSL_FUNC_asym_cipher_freectx_fn *freectx; + OSSL_FUNC_asym_cipher_dupctx_fn *dupctx; + OSSL_FUNC_asym_cipher_get_ctx_params_fn *get_ctx_params; + OSSL_FUNC_asym_cipher_gettable_ctx_params_fn *gettable_ctx_params; + OSSL_FUNC_asym_cipher_set_ctx_params_fn *set_ctx_params; + OSSL_FUNC_asym_cipher_settable_ctx_params_fn *settable_ctx_params; } /* EVP_ASYM_CIPHER */; int PKCS5_v2_PBKDF2_keyivgen(EVP_CIPHER_CTX *ctx, const char *pass, diff --git a/crypto/evp/evp_rand.c b/crypto/evp/evp_rand.c index f7bc321f29..6e3541481a 100644 --- a/crypto/evp/evp_rand.c +++ b/crypto/evp/evp_rand.c @@ -107,103 +107,103 @@ static void *evp_rand_from_dispatch(int name_id, case OSSL_FUNC_RAND_NEWCTX: if (rand->newctx != NULL) break; - rand->newctx = OSSL_get_OP_rand_newctx(fns); + rand->newctx = OSSL_FUNC_rand_newctx(fns); fnctxcnt++; break; case OSSL_FUNC_RAND_FREECTX: if (rand->freectx != NULL) break; - rand->freectx = OSSL_get_OP_rand_freectx(fns); + rand->freectx = OSSL_FUNC_rand_freectx(fns); fnctxcnt++; break; case OSSL_FUNC_RAND_INSTANTIATE: if (rand->instantiate != NULL) break; - rand->instantiate = OSSL_get_OP_rand_instantiate(fns); + rand->instantiate = OSSL_FUNC_rand_instantiate(fns); fnrandcnt++; break; case OSSL_FUNC_RAND_UNINSTANTIATE: if (rand->uninstantiate != NULL) break; - rand->uninstantiate = OSSL_get_OP_rand_uninstantiate(fns); + rand->uninstantiate = OSSL_FUNC_rand_uninstantiate(fns); fnrandcnt++; break; case OSSL_FUNC_RAND_GENERATE: if (rand->generate != NULL) break; - rand->generate = OSSL_get_OP_rand_generate(fns); + rand->generate = OSSL_FUNC_rand_generate(fns); fnrandcnt++; break; case OSSL_FUNC_RAND_RESEED: if (rand->reseed != NULL) break; - rand->reseed = OSSL_get_OP_rand_reseed(fns); + rand->reseed = OSSL_FUNC_rand_reseed(fns); break; case OSSL_FUNC_RAND_NONCE: if (rand->nonce != NULL) break; - rand->nonce = OSSL_get_OP_rand_nonce(fns); + rand->nonce = OSSL_FUNC_rand_nonce(fns); break; case OSSL_FUNC_RAND_SET_CALLBACKS: if (rand->set_callbacks != NULL) break; - rand->set_callbacks = OSSL_get_OP_rand_set_callbacks(fns); + rand->set_callbacks = OSSL_FUNC_rand_set_callbacks(fns); break; case OSSL_FUNC_RAND_ENABLE_LOCKING: if (rand->enable_locking != NULL) break; - rand->enable_locking = OSSL_get_OP_rand_enable_locking(fns); + rand->enable_locking = OSSL_FUNC_rand_enable_locking(fns); fnlockcnt++; break; case OSSL_FUNC_RAND_LOCK: if (rand->lock != NULL) break; - rand->lock = OSSL_get_OP_rand_lock(fns); + rand->lock = OSSL_FUNC_rand_lock(fns); fnlockcnt++; break; case OSSL_FUNC_RAND_UNLOCK: if (rand->unlock != NULL) break; - rand->unlock = OSSL_get_OP_rand_unlock(fns); + rand->unlock = OSSL_FUNC_rand_unlock(fns); fnlockcnt++; break; case OSSL_FUNC_RAND_GETTABLE_PARAMS: if (rand->gettable_params != NULL) break; rand->gettable_params = - OSSL_get_OP_rand_gettable_params(fns); + OSSL_FUNC_rand_gettable_params(fns); break; case OSSL_FUNC_RAND_GETTABLE_CTX_PARAMS: if (rand->gettable_ctx_params != NULL) break; rand->gettable_ctx_params = - OSSL_get_OP_rand_gettable_ctx_params(fns); + OSSL_FUNC_rand_gettable_ctx_params(fns); break; case OSSL_FUNC_RAND_SETTABLE_CTX_PARAMS: if (rand->settable_ctx_params != NULL) break; rand->settable_ctx_params = - OSSL_get_OP_rand_settable_ctx_params(fns); + OSSL_FUNC_rand_settable_ctx_params(fns); break; case OSSL_FUNC_RAND_GET_PARAMS: if (rand->get_params != NULL) break; - rand->get_params = OSSL_get_OP_rand_get_params(fns); + rand->get_params = OSSL_FUNC_rand_get_params(fns); break; case OSSL_FUNC_RAND_GET_CTX_PARAMS: if (rand->get_ctx_params != NULL) break; - rand->get_ctx_params = OSSL_get_OP_rand_get_ctx_params(fns); + rand->get_ctx_params = OSSL_FUNC_rand_get_ctx_params(fns); break; case OSSL_FUNC_RAND_SET_CTX_PARAMS: if (rand->set_ctx_params != NULL) break; - rand->set_ctx_params = OSSL_get_OP_rand_set_ctx_params(fns); + rand->set_ctx_params = OSSL_FUNC_rand_set_ctx_params(fns); break; case OSSL_FUNC_RAND_VERIFY_ZEROIZATION: if (rand->verify_zeroization != NULL) break; - rand->verify_zeroization = OSSL_get_OP_rand_verify_zeroization(fns); + rand->verify_zeroization = OSSL_FUNC_rand_verify_zeroization(fns); #ifdef FIPS_MODULE fnzeroizecnt++; #endif diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c index 514ecd4039..28e1f88db9 100644 --- a/crypto/evp/exchange.c +++ b/crypto/evp/exchange.c @@ -57,61 +57,61 @@ static void *evp_keyexch_from_dispatch(int name_id, case OSSL_FUNC_KEYEXCH_NEWCTX: if (exchange->newctx != NULL) break; - exchange->newctx = OSSL_get_OP_keyexch_newctx(fns); + exchange->newctx = OSSL_FUNC_keyexch_newctx(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_INIT: if (exchange->init != NULL) break; - exchange->init = OSSL_get_OP_keyexch_init(fns); + exchange->init = OSSL_FUNC_keyexch_init(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_SET_PEER: if (exchange->set_peer != NULL) break; - exchange->set_peer = OSSL_get_OP_keyexch_set_peer(fns); + exchange->set_peer = OSSL_FUNC_keyexch_set_peer(fns); break; case OSSL_FUNC_KEYEXCH_DERIVE: if (exchange->derive != NULL) break; - exchange->derive = OSSL_get_OP_keyexch_derive(fns); + exchange->derive = OSSL_FUNC_keyexch_derive(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_FREECTX: if (exchange->freectx != NULL) break; - exchange->freectx = OSSL_get_OP_keyexch_freectx(fns); + exchange->freectx = OSSL_FUNC_keyexch_freectx(fns); fncnt++; break; case OSSL_FUNC_KEYEXCH_DUPCTX: if (exchange->dupctx != NULL) break; - exchange->dupctx = OSSL_get_OP_keyexch_dupctx(fns); + exchange->dupctx = OSSL_FUNC_keyexch_dupctx(fns); break; case OSSL_FUNC_KEYEXCH_GET_CTX_PARAMS: if (exchange->get_ctx_params != NULL) break; - exchange->get_ctx_params = OSSL_get_OP_keyexch_get_ctx_params(fns); + exchange->get_ctx_params = OSSL_FUNC_keyexch_get_ctx_params(fns); gparamfncnt++; break; case OSSL_FUNC_KEYEXCH_GETTABLE_CTX_PARAMS: if (exchange->gettable_ctx_params != NULL) break; exchange->gettable_ctx_params - = OSSL_get_OP_keyexch_gettable_ctx_params(fns); + = OSSL_FUNC_keyexch_gettable_ctx_params(fns); gparamfncnt++; break; case OSSL_FUNC_KEYEXCH_SET_CTX_PARAMS: if (exchange->set_ctx_params != NULL) break; - exchange->set_ctx_params = OSSL_get_OP_keyexch_set_ctx_params(fns); + exchange->set_ctx_params = OSSL_FUNC_keyexch_set_ctx_params(fns); sparamfncnt++; break; case OSSL_FUNC_KEYEXCH_SETTABLE_CTX_PARAMS: if (exchange->settable_ctx_params != NULL) break; exchange->settable_ctx_params - = OSSL_get_OP_keyexch_settable_ctx_params(fns); + = OSSL_FUNC_keyexch_settable_ctx_params(fns); sparamfncnt++; break; } diff --git a/crypto/evp/kdf_meth.c b/crypto/evp/kdf_meth.c index a328c97c08..304718f80e 100644 --- a/crypto/evp/kdf_meth.c +++ b/crypto/evp/kdf_meth.c @@ -70,63 +70,63 @@ static void *evp_kdf_from_dispatch(int name_id, case OSSL_FUNC_KDF_NEWCTX: if (kdf->newctx != NULL) break; - kdf->newctx = OSSL_get_OP_kdf_newctx(fns); + kdf->newctx = OSSL_FUNC_kdf_newctx(fns); fnctxcnt++; break; case OSSL_FUNC_KDF_DUPCTX: if (kdf->dupctx != NULL) break; - kdf->dupctx = OSSL_get_OP_kdf_dupctx(fns); + kdf->dupctx = OSSL_FUNC_kdf_dupctx(fns); break; case OSSL_FUNC_KDF_FREECTX: if (kdf->freectx != NULL) break; - kdf->freectx = OSSL_get_OP_kdf_freectx(fns); + kdf->freectx = OSSL_FUNC_kdf_freectx(fns); fnctxcnt++; break; case OSSL_FUNC_KDF_RESET: if (kdf->reset != NULL) break; - kdf->reset = OSSL_get_OP_kdf_reset(fns); + kdf->reset = OSSL_FUNC_kdf_reset(fns); break; case OSSL_FUNC_KDF_DERIVE: if (kdf->derive != NULL) break; - kdf->derive = OSSL_get_OP_kdf_derive(fns); + kdf->derive = OSSL_FUNC_kdf_derive(fns); fnkdfcnt++; break; case OSSL_FUNC_KDF_GETTABLE_PARAMS: if (kdf->gettable_params != NULL) break; kdf->gettable_params = - OSSL_get_OP_kdf_gettable_params(fns); + OSSL_FUNC_kdf_gettable_params(fns); break; case OSSL_FUNC_KDF_GETTABLE_CTX_PARAMS: if (kdf->gettable_ctx_params != NULL) break; kdf->gettable_ctx_params = - OSSL_get_OP_kdf_gettable_ctx_params(fns); + OSSL_FUNC_kdf_gettable_ctx_params(fns); break; case OSSL_FUNC_KDF_SETTABLE_CTX_PARAMS: if (kdf->settable_ctx_params != NULL) break; kdf->settable_ctx_params = - OSSL_get_OP_kdf_settable_ctx_params(fns); + OSSL_FUNC_kdf_settable_ctx_params(fns); break; case OSSL_FUNC_KDF_GET_PARAMS: if (kdf->get_params != NULL) break; - kdf->get_params = OSSL_get_OP_kdf_get_params(fns); + kdf->get_params = OSSL_FUNC_kdf_get_params(fns); break; case OSSL_FUNC_KDF_GET_CTX_PARAMS: if (kdf->get_ctx_params != NULL) break; - kdf->get_ctx_params = OSSL_get_OP_kdf_get_ctx_params(fns); + kdf->get_ctx_params = OSSL_FUNC_kdf_get_ctx_params(fns); break; case OSSL_FUNC_KDF_SET_CTX_PARAMS: if (kdf->set_ctx_params != NULL) break; - kdf->set_ctx_params = OSSL_get_OP_kdf_set_ctx_params(fns); + kdf->set_ctx_params = OSSL_FUNC_kdf_set_ctx_params(fns); break; } } diff --git a/crypto/evp/keymgmt_meth.c b/crypto/evp/keymgmt_meth.c index 55dcae73e3..7847b98380 100644 --- a/crypto/evp/keymgmt_meth.c +++ b/crypto/evp/keymgmt_meth.c @@ -52,112 +52,112 @@ static void *keymgmt_from_dispatch(int name_id, switch (fns->function_id) { case OSSL_FUNC_KEYMGMT_NEW: if (keymgmt->new == NULL) - keymgmt->new = OSSL_get_OP_keymgmt_new(fns); + keymgmt->new = OSSL_FUNC_keymgmt_new(fns); break; case OSSL_FUNC_KEYMGMT_GEN_INIT: if (keymgmt->gen_init == NULL) - keymgmt->gen_init = OSSL_get_OP_keymgmt_gen_init(fns); + keymgmt->gen_init = OSSL_FUNC_keymgmt_gen_init(fns); break; case OSSL_FUNC_KEYMGMT_GEN_SET_TEMPLATE: if (keymgmt->gen_set_template == NULL) keymgmt->gen_set_template = - OSSL_get_OP_keymgmt_gen_set_template(fns); + OSSL_FUNC_keymgmt_gen_set_template(fns); break; case OSSL_FUNC_KEYMGMT_GEN_SET_PARAMS: if (keymgmt->gen_set_params == NULL) { setgenparamfncnt++; keymgmt->gen_set_params = - OSSL_get_OP_keymgmt_gen_set_params(fns); + OSSL_FUNC_keymgmt_gen_set_params(fns); } break; case OSSL_FUNC_KEYMGMT_GEN_SETTABLE_PARAMS: if (keymgmt->gen_settable_params == NULL) { setgenparamfncnt++; keymgmt->gen_settable_params = - OSSL_get_OP_keymgmt_gen_settable_params(fns); + OSSL_FUNC_keymgmt_gen_settable_params(fns); } break; case OSSL_FUNC_KEYMGMT_GEN: if (keymgmt->gen == NULL) - keymgmt->gen = OSSL_get_OP_keymgmt_gen(fns); + keymgmt->gen = OSSL_FUNC_keymgmt_gen(fns); break; case OSSL_FUNC_KEYMGMT_GEN_CLEANUP: if (keymgmt->gen_cleanup == NULL) - keymgmt->gen_cleanup = OSSL_get_OP_keymgmt_gen_cleanup(fns); + keymgmt->gen_cleanup = OSSL_FUNC_keymgmt_gen_cleanup(fns); break; case OSSL_FUNC_KEYMGMT_FREE: if (keymgmt->free == NULL) - keymgmt->free = OSSL_get_OP_keymgmt_free(fns); + keymgmt->free = OSSL_FUNC_keymgmt_free(fns); break; case OSSL_FUNC_KEYMGMT_GET_PARAMS: if (keymgmt->get_params == NULL) { getparamfncnt++; - keymgmt->get_params = OSSL_get_OP_keymgmt |