diff options
Diffstat (limited to 'providers/implementations/kdfs/kbkdf.c')
-rw-r--r-- | providers/implementations/kdfs/kbkdf.c | 12 |
1 files changed, 2 insertions, 10 deletions
diff --git a/providers/implementations/kdfs/kbkdf.c b/providers/implementations/kdfs/kbkdf.c index 26235e400b..ab6e5c87a9 100644 --- a/providers/implementations/kdfs/kbkdf.c +++ b/providers/implementations/kdfs/kbkdf.c @@ -280,7 +280,6 @@ static int kbkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[]) KBKDF *ctx = (KBKDF *)vctx; OSSL_LIB_CTX *libctx = PROV_LIBCTX_OF(ctx->provctx); const OSSL_PARAM *p; - OSSL_PARAM mparams[2]; if (!ossl_prov_macctx_load_from_params(&ctx->ctx_init, params, NULL, NULL, NULL, libctx)) @@ -330,16 +329,9 @@ static int kbkdf_set_ctx_params(void *vctx, const OSSL_PARAM params[]) return 0; /* Set up digest context, if we can. */ - if (ctx->ctx_init != NULL && ctx->ki_len != 0) { - mparams[0] = OSSL_PARAM_construct_octet_string(OSSL_MAC_PARAM_KEY, - ctx->ki, ctx->ki_len); - mparams[1] = OSSL_PARAM_construct_end(); - - if (!EVP_MAC_CTX_set_params(ctx->ctx_init, mparams) - || !EVP_MAC_init(ctx->ctx_init)) + if (ctx->ctx_init != NULL && ctx->ki_len != 0 + && !EVP_MAC_init(ctx->ctx_init, ctx->ki, ctx->ki_len, NULL)) return 0; - } - return 1; } |