From: Tomas Mraz Date: Fri, 13 Nov 2020 12:42:31 +0000 (+0100) Subject: EVP_DigestFinalXOF must not reset the EVP_MD_CTX X-Git-Tag: openssl-3.0.0-alpha10~258 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=39fde64a85c93d2b3c6c58d5bde383f5f3932e5f;p=thirdparty%2Fopenssl.git EVP_DigestFinalXOF must not reset the EVP_MD_CTX It does not do it in legacy path and 1.1.1 so that must not change. Reviewed-by: Dmitry Belyavskiy Reviewed-by: Shane Lontis (Merged from https://github.com/openssl/openssl/pull/13402) --- diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 3872bb68fbb..19d9face898 100644 --- a/crypto/evp/digest.c +++ b/crypto/evp/digest.c @@ -455,7 +455,7 @@ int EVP_DigestFinalXOF(EVP_MD_CTX *ctx, unsigned char *md, size_t size) if (EVP_MD_CTX_set_params(ctx, params) > 0) ret = ctx->digest->dfinal(ctx->provctx, md, &size, size); - EVP_MD_CTX_reset(ctx); + return ret; legacy: