diff options
author | Tomas Mraz <tomas@openssl.org> | 2021-05-21 16:58:08 +0200 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2021-06-01 12:40:00 +0200 |
commit | ed576acdf591d4164905ab98e89ca5a3b99d90ab (patch) | |
tree | c0f36ca1b3d42f34c0c502e700ad09b69b713d3c /crypto/evp/keymgmt_meth.c | |
parent | 5e2d22d53ed322a7124e26a4fbd116a8210eb77a (diff) |
Rename all getters to use get/get0 in name
For functions that exist in 1.1.1 provide a simple aliases via #define.
Fixes #15236
Functions with OSSL_DECODER_, OSSL_ENCODER_, OSSL_STORE_LOADER_,
EVP_KEYEXCH_, EVP_KEM_, EVP_ASYM_CIPHER_, EVP_SIGNATURE_,
EVP_KEYMGMT_, EVP_RAND_, EVP_MAC_, EVP_KDF_, EVP_PKEY_,
EVP_MD_, and EVP_CIPHER_ prefixes are renamed.
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/15405)
Diffstat (limited to 'crypto/evp/keymgmt_meth.c')
-rw-r--r-- | crypto/evp/keymgmt_meth.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/crypto/evp/keymgmt_meth.c b/crypto/evp/keymgmt_meth.c index 94f0133860..841eae1df8 100644 --- a/crypto/evp/keymgmt_meth.c +++ b/crypto/evp/keymgmt_meth.c @@ -246,22 +246,22 @@ void EVP_KEYMGMT_free(EVP_KEYMGMT *keymgmt) OPENSSL_free(keymgmt); } -const OSSL_PROVIDER *EVP_KEYMGMT_provider(const EVP_KEYMGMT *keymgmt) +const OSSL_PROVIDER *EVP_KEYMGMT_get0_provider(const EVP_KEYMGMT *keymgmt) { return keymgmt->prov; } -int EVP_KEYMGMT_number(const EVP_KEYMGMT *keymgmt) +int EVP_KEYMGMT_get_number(const EVP_KEYMGMT *keymgmt) { return keymgmt->name_id; } -const char *EVP_KEYMGMT_description(const EVP_KEYMGMT *keymgmt) +const char *EVP_KEYMGMT_get0_description(const EVP_KEYMGMT *keymgmt) { return keymgmt->description; } -const char *EVP_KEYMGMT_name(const EVP_KEYMGMT *keymgmt) +const char *EVP_KEYMGMT_get0_name(const EVP_KEYMGMT *keymgmt) { return keymgmt->type_name; } @@ -296,7 +296,7 @@ int EVP_KEYMGMT_names_do_all(const EVP_KEYMGMT *keymgmt, */ void *evp_keymgmt_newdata(const EVP_KEYMGMT *keymgmt) { - void *provctx = ossl_provider_ctx(EVP_KEYMGMT_provider(keymgmt)); + void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt)); /* * 'new' is currently mandatory on its own, but when new @@ -317,7 +317,7 @@ void evp_keymgmt_freedata(const EVP_KEYMGMT *keymgmt, void *keydata) void *evp_keymgmt_gen_init(const EVP_KEYMGMT *keymgmt, int selection, const OSSL_PARAM params[]) { - void *provctx = ossl_provider_ctx(EVP_KEYMGMT_provider(keymgmt)); + void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt)); if (keymgmt->gen_init == NULL) return NULL; @@ -348,7 +348,7 @@ int evp_keymgmt_gen_set_params(const EVP_KEYMGMT *keymgmt, void *genctx, const OSSL_PARAM *EVP_KEYMGMT_gen_settable_params(const EVP_KEYMGMT *keymgmt) { - void *provctx = ossl_provider_ctx(EVP_KEYMGMT_provider(keymgmt)); + void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt)); if (keymgmt->gen_settable_params == NULL) return NULL; @@ -387,7 +387,7 @@ int evp_keymgmt_get_params(const EVP_KEYMGMT *keymgmt, void *keydata, const OSSL_PARAM *EVP_KEYMGMT_gettable_params(const EVP_KEYMGMT *keymgmt) { - void *provctx = ossl_provider_ctx(EVP_KEYMGMT_provider(keymgmt)); + void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt)); if (keymgmt->gettable_params == NULL) return NULL; @@ -404,7 +404,7 @@ int evp_keymgmt_set_params(const EVP_KEYMGMT *keymgmt, void *keydata, const OSSL_PARAM *EVP_KEYMGMT_settable_params(const EVP_KEYMGMT *keymgmt) { - void *provctx = ossl_provider_ctx(EVP_KEYMGMT_provider(keymgmt)); + void *provctx = ossl_provider_ctx(EVP_KEYMGMT_get0_provider(keymgmt)); if (keymgmt->settable_params == NULL) return NULL; |