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/exchange.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/exchange.c')
-rw-r--r-- | crypto/evp/exchange.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/crypto/evp/exchange.c b/crypto/evp/exchange.c index fb5521681a..2a066082d7 100644 --- a/crypto/evp/exchange.c +++ b/crypto/evp/exchange.c @@ -166,7 +166,7 @@ int EVP_KEYEXCH_up_ref(EVP_KEYEXCH *exchange) return 1; } -OSSL_PROVIDER *EVP_KEYEXCH_provider(const EVP_KEYEXCH *exchange) +OSSL_PROVIDER *EVP_KEYEXCH_get0_provider(const EVP_KEYEXCH *exchange) { return exchange->prov; } @@ -264,8 +264,8 @@ int EVP_PKEY_derive_init_ex(EVP_PKEY_CTX *ctx, const OSSL_PARAM params[]) exchange = EVP_KEYEXCH_fetch(ctx->libctx, supported_exch, ctx->propquery); if (exchange == NULL - || (EVP_KEYMGMT_provider(ctx->keymgmt) - != EVP_KEYEXCH_provider(exchange))) { + || (EVP_KEYMGMT_get0_provider(ctx->keymgmt) + != EVP_KEYEXCH_get0_provider(exchange))) { /* * We don't need to free ctx->keymgmt here, as it's not necessarily * tied to this operation. It will be freed by EVP_PKEY_CTX_free(). @@ -464,17 +464,17 @@ int EVP_PKEY_derive(EVP_PKEY_CTX *ctx, unsigned char *key, size_t *pkeylen) return ctx->pmeth->derive(ctx, key, pkeylen); } -int EVP_KEYEXCH_number(const EVP_KEYEXCH *keyexch) +int EVP_KEYEXCH_get_number(const EVP_KEYEXCH *keyexch) { return keyexch->name_id; } -const char *EVP_KEYEXCH_name(const EVP_KEYEXCH *keyexch) +const char *EVP_KEYEXCH_get0_name(const EVP_KEYEXCH *keyexch) { return keyexch->type_name; } -const char *EVP_KEYEXCH_description(const EVP_KEYEXCH *keyexch) +const char *EVP_KEYEXCH_get0_description(const EVP_KEYEXCH *keyexch) { return keyexch->description; } @@ -511,7 +511,7 @@ const OSSL_PARAM *EVP_KEYEXCH_gettable_ctx_params(const EVP_KEYEXCH *keyexch) if (keyexch == NULL || keyexch->gettable_ctx_params == NULL) return NULL; - provctx = ossl_provider_ctx(EVP_KEYEXCH_provider(keyexch)); + provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(keyexch)); return keyexch->gettable_ctx_params(NULL, provctx); } @@ -521,6 +521,6 @@ const OSSL_PARAM *EVP_KEYEXCH_settable_ctx_params(const EVP_KEYEXCH *keyexch) if (keyexch == NULL || keyexch->settable_ctx_params == NULL) return NULL; - provctx = ossl_provider_ctx(EVP_KEYEXCH_provider(keyexch)); + provctx = ossl_provider_ctx(EVP_KEYEXCH_get0_provider(keyexch)); return keyexch->settable_ctx_params(NULL, provctx); } |