From 39fde64a85c93d2b3c6c58d5bde383f5f3932e5f Mon Sep 17 00:00:00 2001 From: Tomas Mraz Date: Fri, 13 Nov 2020 13:42:31 +0100 Subject: [PATCH] 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) --- crypto/evp/digest.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crypto/evp/digest.c b/crypto/evp/digest.c index 3872bb68fb..19d9face89 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: -- 2.39.2