mirror of https://github.com/openssl/openssl.git
kmac: avoid using ossl_prov_digest_load_from_params()
Reviewed-by: Tomas Mraz <tomas@openssl.org> Reviewed-by: Tim Hudson <tjh@openssl.org> Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com> (Merged from https://github.com/openssl/openssl/pull/28361)
This commit is contained in:
parent
f316d93502
commit
d5efc85379
|
@ -189,15 +189,24 @@ static struct kmac_data_st *kmac_new(void *provctx)
|
||||||
return kctx;
|
return kctx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define kmac_new_list
|
||||||
|
|
||||||
|
{- produce_param_decoder('kmac_new',
|
||||||
|
(['MAC_PARAM_DIGEST', 'digest', 'utf8_string'],
|
||||||
|
['MAC_PARAM_PROPERTIES', 'propq', 'utf8_string'],
|
||||||
|
['ALG_PARAM_ENGINE', 'engine', 'utf8_string', 'hidden'],
|
||||||
|
)); -}
|
||||||
|
|
||||||
static void *kmac_fetch_new(void *provctx, const OSSL_PARAM *params)
|
static void *kmac_fetch_new(void *provctx, const OSSL_PARAM *params)
|
||||||
{
|
{
|
||||||
struct kmac_data_st *kctx = kmac_new(provctx);
|
struct kmac_data_st *kctx = kmac_new(provctx);
|
||||||
|
struct kmac_new_st p;
|
||||||
int md_size;
|
int md_size;
|
||||||
|
|
||||||
if (kctx == NULL)
|
if (kctx == NULL || !kmac_new_decoder(params, &p))
|
||||||
return 0;
|
return 0;
|
||||||
if (!ossl_prov_digest_load_from_params(&kctx->digest, params,
|
if (!ossl_prov_digest_load(&kctx->digest, p.digest, p.propq, p.engine,
|
||||||
PROV_LIBCTX_OF(provctx))) {
|
PROV_LIBCTX_OF(provctx))) {
|
||||||
kmac_free(kctx);
|
kmac_free(kctx);
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue