From 07626ea9e5400bd857a58a4da06756748701e9ed Mon Sep 17 00:00:00 2001 From: Dmitry Belyavskiy Date: Thu, 16 Feb 2023 11:23:09 +0100 Subject: Avoid erroneous diagnostics in speed measuring Fixes #20291 Reviewed-by: Tom Cosgrove Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/20306) --- apps/speed.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'apps') diff --git a/apps/speed.c b/apps/speed.c index b647e2022b..5d4b389da6 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -774,7 +774,7 @@ static int EVP_Update_loop(void *args) else rc = EVP_EncryptFinal_ex(ctx, buf, &outl); - if (rc <= 1) + if (rc == 0) BIO_printf(bio_err, "Error finalizing cipher loop\n"); return count; } @@ -816,7 +816,7 @@ static int EVP_Update_loop_ccm(void *args) else final = EVP_EncryptFinal_ex(ctx, buf, &outl); - if (final <= 1) + if (final == 0) BIO_printf(bio_err, "Error finalizing ccm loop\n"); return realcount; } -- cgit v1.2.3