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/ctrl_params_translate.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/ctrl_params_translate.c')
-rw-r--r-- | crypto/evp/ctrl_params_translate.c | 28 |
1 files changed, 14 insertions, 14 deletions
diff --git a/crypto/evp/ctrl_params_translate.c b/crypto/evp/ctrl_params_translate.c index 7e550f81a1..e289c7df7b 100644 --- a/crypto/evp/ctrl_params_translate.c +++ b/crypto/evp/ctrl_params_translate.c @@ -710,12 +710,12 @@ cleanup_translation_ctx(enum state state, */ static const char *get_cipher_name(void *cipher) { - return EVP_CIPHER_name(cipher); + return EVP_CIPHER_get0_name(cipher); } static const char *get_md_name(void *md) { - return EVP_MD_name(md); + return EVP_MD_get0_name(md); } static const void *get_cipher_by_name(OSSL_LIB_CTX *libctx, const char *name) @@ -1456,7 +1456,7 @@ static int get_payload_group_name(enum state state, EVP_PKEY *pkey = ctx->p2; ctx->p2 = NULL; - switch (EVP_PKEY_base_id(pkey)) { + switch (EVP_PKEY_get_base_id(pkey)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: { @@ -1512,7 +1512,7 @@ static int get_payload_private_key(enum state state, if (ctx->params->data_type != OSSL_PARAM_UNSIGNED_INTEGER) return 0; - switch (EVP_PKEY_base_id(pkey)) { + switch (EVP_PKEY_get_base_id(pkey)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: { @@ -1548,7 +1548,7 @@ static int get_payload_public_key(enum state state, int ret; ctx->p2 = NULL; - switch (EVP_PKEY_base_id(pkey)) { + switch (EVP_PKEY_get_base_id(pkey)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: switch (ctx->params->data_type) { @@ -1618,7 +1618,7 @@ static int get_dh_dsa_payload_p(enum state state, const BIGNUM *bn = NULL; EVP_PKEY *pkey = ctx->p2; - switch (EVP_PKEY_base_id(pkey)) { + switch (EVP_PKEY_get_base_id(pkey)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: bn = DH_get0_p(EVP_PKEY_get0_DH(pkey)); @@ -1642,7 +1642,7 @@ static int get_dh_dsa_payload_q(enum state state, { const BIGNUM *bn = NULL; - switch (EVP_PKEY_base_id(ctx->p2)) { + switch (EVP_PKEY_get_base_id(ctx->p2)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: bn = DH_get0_q(EVP_PKEY_get0_DH(ctx->p2)); @@ -1664,7 +1664,7 @@ static int get_dh_dsa_payload_g(enum state state, { const BIGNUM *bn = NULL; - switch (EVP_PKEY_base_id(ctx->p2)) { + switch (EVP_PKEY_get_base_id(ctx->p2)) { #ifndef OPENSSL_NO_DH case EVP_PKEY_DH: bn = DH_get0_g(EVP_PKEY_get0_DH(ctx->p2)); @@ -1720,7 +1720,7 @@ static int get_rsa_payload_n(enum state state, { const BIGNUM *bn = NULL; - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) return 0; bn = RSA_get0_n(EVP_PKEY_get0_RSA(ctx->p2)); @@ -1733,7 +1733,7 @@ static int get_rsa_payload_e(enum state state, { const BIGNUM *bn = NULL; - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) return 0; bn = RSA_get0_e(EVP_PKEY_get0_RSA(ctx->p2)); @@ -1746,7 +1746,7 @@ static int get_rsa_payload_d(enum state state, { const BIGNUM *bn = NULL; - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) return 0; bn = RSA_get0_d(EVP_PKEY_get0_RSA(ctx->p2)); @@ -1846,7 +1846,7 @@ static int get_rsa_payload_coefficient(enum state state, const struct translation_st *translation, \ struct translation_ctx_st *ctx) \ { \ - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) \ + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \ return 0; \ return get_rsa_payload_factor(state, translation, ctx, n - 1); \ } @@ -1857,7 +1857,7 @@ static int get_rsa_payload_coefficient(enum state state, const struct translation_st *translation, \ struct translation_ctx_st *ctx) \ { \ - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) \ + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \ return 0; \ return get_rsa_payload_exponent(state, translation, ctx, \ n - 1); \ @@ -1869,7 +1869,7 @@ static int get_rsa_payload_coefficient(enum state state, const struct translation_st *translation, \ struct translation_ctx_st *ctx) \ { \ - if (EVP_PKEY_base_id(ctx->p2) != EVP_PKEY_RSA) \ + if (EVP_PKEY_get_base_id(ctx->p2) != EVP_PKEY_RSA) \ return 0; \ return get_rsa_payload_coefficient(state, translation, ctx, \ n - 1); \ |