From: Pauli Date: Thu, 28 Aug 2025 04:48:10 +0000 (+1000) Subject: pbkdf2: avoid using ossl_prov_digest_load_from_params() X-Git-Tag: 4.0-PRE-CLANG-FORMAT-WEBKIT~585 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=89098387e925bc72f5ce2b6fae0d9b766f510441;p=thirdparty%2Fopenssl.git pbkdf2: avoid using ossl_prov_digest_load_from_params() Reviewed-by: Tomas Mraz Reviewed-by: Tim Hudson Reviewed-by: Dmitry Belyavskiy (Merged from https://github.com/openssl/openssl/pull/28361) --- diff --git a/providers/implementations/kdfs/pbkdf2.c.in b/providers/implementations/kdfs/pbkdf2.c.in index 01eebc453d0..cdffbfc90cd 100644 --- a/providers/implementations/kdfs/pbkdf2.c.in +++ b/providers/implementations/kdfs/pbkdf2.c.in @@ -151,12 +151,12 @@ static void *kdf_pbkdf2_dup(void *vctx) static void kdf_pbkdf2_init(KDF_PBKDF2 *ctx) { - OSSL_PARAM params[2] = { OSSL_PARAM_END, OSSL_PARAM_END }; + OSSL_PARAM param; OSSL_LIB_CTX *provctx = PROV_LIBCTX_OF(ctx->provctx); - params[0] = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST, - SN_sha1, 0); - if (!ossl_prov_digest_load_from_params(&ctx->digest, params, provctx)) + param = OSSL_PARAM_construct_utf8_string(OSSL_KDF_PARAM_DIGEST, + SN_sha1, 0); + if (!ossl_prov_digest_load(&ctx->digest, ¶m, NULL, NULL, provctx)) /* This is an error, but there is no way to indicate such directly */ ossl_prov_digest_reset(&ctx->digest); ctx->iter = PKCS5_DEFAULT_ITER;