summaryrefslogtreecommitdiffstats
path: root/providers/common/ciphers/aes.c
diff options
context:
space:
mode:
Diffstat (limited to 'providers/common/ciphers/aes.c')
-rw-r--r--providers/common/ciphers/aes.c30
1 files changed, 15 insertions, 15 deletions
diff --git a/providers/common/ciphers/aes.c b/providers/common/ciphers/aes.c
index 32ae19be3f..c7ab30de23 100644
--- a/providers/common/ciphers/aes.c
+++ b/providers/common/ciphers/aes.c
@@ -28,8 +28,8 @@ static OSSL_OP_cipher_final_fn aes_stream_final;
static OSSL_OP_cipher_cipher_fn aes_cipher;
static OSSL_OP_cipher_freectx_fn aes_freectx;
static OSSL_OP_cipher_dupctx_fn aes_dupctx;
-static OSSL_OP_cipher_ctx_get_params_fn aes_ctx_get_params;
-static OSSL_OP_cipher_ctx_set_params_fn aes_ctx_set_params;
+static OSSL_OP_cipher_get_ctx_params_fn aes_get_ctx_params;
+static OSSL_OP_cipher_set_ctx_params_fn aes_set_ctx_params;
static int PROV_AES_KEY_generic_init(PROV_AES_KEY *ctx,
const unsigned char *iv,
@@ -360,7 +360,7 @@ static void *aes_dupctx(void *ctx)
return ret;
}
-static int aes_ctx_get_params(void *vctx, OSSL_PARAM params[])
+static int aes_get_ctx_params(void *vctx, OSSL_PARAM params[])
{
PROV_AES_KEY *ctx = (PROV_AES_KEY *)vctx;
OSSL_PARAM *p;
@@ -372,26 +372,26 @@ static int aes_ctx_get_params(void *vctx, OSSL_PARAM params[])
}
p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_PADDING);
if (p != NULL && !OSSL_PARAM_set_int(p, ctx->pad)) {
- PROVerr(PROV_F_AES_CTX_GET_PARAMS, PROV_R_FAILED_TO_SET_PARAMETER);
+ PROVerr(PROV_F_AES_GET_CTX_PARAMS, PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_IV);
if (p != NULL
&& !OSSL_PARAM_set_octet_ptr(p, &ctx->iv, AES_BLOCK_SIZE)
&& !OSSL_PARAM_set_octet_string(p, &ctx->iv, AES_BLOCK_SIZE)) {
- PROVerr(PROV_F_AES_CTX_GET_PARAMS,
+ PROVerr(PROV_F_AES_GET_CTX_PARAMS,
PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_NUM);
if (p != NULL && !OSSL_PARAM_set_size_t(p, ctx->num)) {
- PROVerr(PROV_F_AES_CTX_GET_PARAMS,
+ PROVerr(PROV_F_AES_GET_CTX_PARAMS,
PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
p = OSSL_PARAM_locate(params, OSSL_CIPHER_PARAM_KEYLEN);
if (p != NULL && !OSSL_PARAM_set_int(p, ctx->keylen)) {
- PROVerr(PROV_F_AES_CTX_GET_PARAMS,
+ PROVerr(PROV_F_AES_GET_CTX_PARAMS,
PROV_R_FAILED_TO_SET_PARAMETER);
return 0;
}
@@ -399,7 +399,7 @@ static int aes_ctx_get_params(void *vctx, OSSL_PARAM params[])
return 1;
}
-static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
+static int aes_set_ctx_params(void *vctx, const OSSL_PARAM params[])
{
PROV_AES_KEY *ctx = (PROV_AES_KEY *)vctx;
const OSSL_PARAM *p;
@@ -409,7 +409,7 @@ static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
int pad;
if (!OSSL_PARAM_get_int(p, &pad)) {
- PROVerr(PROV_F_AES_CTX_SET_PARAMS,
+ PROVerr(PROV_F_AES_SET_CTX_PARAMS,
PROV_R_FAILED_TO_GET_PARAMETER);
return 0;
}
@@ -420,7 +420,7 @@ static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
int num;
if (!OSSL_PARAM_get_int(p, &num)) {
- PROVerr(PROV_F_AES_CTX_SET_PARAMS,
+ PROVerr(PROV_F_AES_SET_CTX_PARAMS,
PROV_R_FAILED_TO_GET_PARAMETER);
return 0;
}
@@ -431,7 +431,7 @@ static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
int keylen;
if (!OSSL_PARAM_get_int(p, &keylen)) {
- PROVerr(PROV_F_AES_CTX_SET_PARAMS,
+ PROVerr(PROV_F_AES_SET_CTX_PARAMS,
PROV_R_FAILED_TO_GET_PARAMETER);
return 0;
}
@@ -451,8 +451,8 @@ static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))aes_freectx }, \
{ OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))aes_dupctx }, \
{ OSSL_FUNC_CIPHER_GET_PARAMS, (void (*)(void))aes_##kbits##_##mode##_get_params }, \
- { OSSL_FUNC_CIPHER_CTX_GET_PARAMS, (void (*)(void))aes_ctx_get_params }, \
- { OSSL_FUNC_CIPHER_CTX_SET_PARAMS, (void (*)(void))aes_ctx_set_params }, \
+ { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, (void (*)(void))aes_get_ctx_params }, \
+ { OSSL_FUNC_CIPHER_SET_CTX_PARAMS, (void (*)(void))aes_set_ctx_params }, \
{ 0, NULL } \
};
@@ -467,8 +467,8 @@ static int aes_ctx_set_params(void *vctx, const OSSL_PARAM params[])
{ OSSL_FUNC_CIPHER_FREECTX, (void (*)(void))aes_freectx }, \
{ OSSL_FUNC_CIPHER_DUPCTX, (void (*)(void))aes_dupctx }, \
{ OSSL_FUNC_CIPHER_GET_PARAMS, (void (*)(void))aes_##kbits##_##mode##_get_params }, \
- { OSSL_FUNC_CIPHER_CTX_GET_PARAMS, (void (*)(void))aes_ctx_get_params }, \
- { OSSL_FUNC_CIPHER_CTX_SET_PARAMS, (void (*)(void))aes_ctx_set_params }, \
+ { OSSL_FUNC_CIPHER_GET_CTX_PARAMS, (void (*)(void))aes_get_ctx_params }, \
+ { OSSL_FUNC_CIPHER_SET_CTX_PARAMS, (void (*)(void))aes_set_ctx_params }, \
{ 0, NULL } \
};