diff options
author | Richard Levitte <levitte@openssl.org> | 2019-08-16 09:04:29 +0200 |
---|---|---|
committer | Richard Levitte <levitte@openssl.org> | 2019-08-16 09:04:29 +0200 |
commit | 92d9d0ae2b10b12e42d33047b60e64ebfc296596 (patch) | |
tree | 36268ad8d147f30bb179cb089449beb39271b8d3 /crypto/evp/evp_enc.c | |
parent | 356461fbbb8f4070f57ac4d13b34e0e0bbfee92b (diff) | |
download | openssl-new-92d9d0ae2b10b12e42d33047b60e64ebfc296596.tar.gz |
Rename ctx_{get,set}_params to {get,set}_ctx_params
Recently, we added dispatched functions to get parameter descriptions,
and those for operation context parameters ended up being called
something_gettable_ctx_params and something_settable_ctx_params.
The corresponding dispatched functions to actually perform parameter
transfers were previously called something_ctx_get_params and
something_ctx_set_params, which doesn't quite match, so we rename them
to something_get_ctx_params and something_set_ctx_params.
An argument in favor of this name change is English, where you'd
rather say something like "set the context parameters".
This only change the libcrypto <-> provider interface.
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/9612)
Diffstat (limited to 'crypto/evp/evp_enc.c')
-rw-r--r-- | crypto/evp/evp_enc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/crypto/evp/evp_enc.c b/crypto/evp/evp_enc.c index 9e0c01aff9..42d8099ec7 100644 --- a/crypto/evp/evp_enc.c +++ b/crypto/evp/evp_enc.c @@ -1060,15 +1060,15 @@ int EVP_CIPHER_get_params(EVP_CIPHER *cipher, OSSL_PARAM params[]) int EVP_CIPHER_CTX_set_params(EVP_CIPHER_CTX *ctx, const OSSL_PARAM params[]) { - if (ctx->cipher != NULL && ctx->cipher->ctx_set_params != NULL) - return ctx->cipher->ctx_set_params(ctx->provctx, params); + if (ctx->cipher != NULL && ctx->cipher->set_ctx_params != NULL) + return ctx->cipher->set_ctx_params(ctx->provctx, params); return 0; } int EVP_CIPHER_CTX_get_params(EVP_CIPHER_CTX *ctx, OSSL_PARAM params[]) { - if (ctx->cipher != NULL && ctx->cipher->ctx_get_params != NULL) - return ctx->cipher->ctx_get_params(ctx->provctx, params); + if (ctx->cipher != NULL && ctx->cipher->get_ctx_params != NULL) + return ctx->cipher->get_ctx_params(ctx->provctx, params); return 0; } @@ -1244,15 +1244,15 @@ static void *evp_cipher_from_dispatch(const char *name, break; cipher->get_params = OSSL_get_OP_cipher_get_params(fns); break; - case OSSL_FUNC_CIPHER_CTX_GET_PARAMS: - if (cipher->ctx_get_params != NULL) + case OSSL_FUNC_CIPHER_GET_CTX_PARAMS: + if (cipher->get_ctx_params != NULL) break; - cipher->ctx_get_params = OSSL_get_OP_cipher_ctx_get_params(fns); + cipher->get_ctx_params = OSSL_get_OP_cipher_get_ctx_params(fns); break; - case OSSL_FUNC_CIPHER_CTX_SET_PARAMS: - if (cipher->ctx_set_params != NULL) + case OSSL_FUNC_CIPHER_SET_CTX_PARAMS: + if (cipher->set_ctx_params != NULL) break; - cipher->ctx_set_params = OSSL_get_OP_cipher_ctx_set_params(fns); + cipher->set_ctx_params = OSSL_get_OP_cipher_set_ctx_params(fns); break; case OSSL_FUNC_CIPHER_GETTABLE_PARAMS: if (cipher->gettable_params != NULL) |