openssl: replace stray legacy API variant with EVP_DigestInit_ex()

To match rest of code, use the modern variant and avoid an unnecessary
internal reset/cleanup.

Closes #22222
This commit is contained in:
Viktor Szakats 2026-06-30 00:06:41 +02:00
parent 5b10939ef7
commit 6fbb65126d
No known key found for this signature in database

View file

@ -5451,7 +5451,7 @@ static CURLcode ossl_sha256sum(const unsigned char *input,
mdctx = EVP_MD_CTX_new();
if(!mdctx)
return CURLE_OUT_OF_MEMORY;
if(!EVP_DigestInit(mdctx, EVP_sha256())) {
if(!EVP_DigestInit_ex(mdctx, EVP_sha256(), NULL)) {
result = CURLE_FAILED_INIT;
goto out;
}