Avoid erroneous diagnostics in speed measuring

Fixes #20291

Reviewed-by: Tom Cosgrove <tom.cosgrove@arm.com>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20306)
This commit is contained in:
Dmitry Belyavskiy 2023-02-16 11:23:09 +01:00 committed by Pauli
parent 3fc2b7d6b8
commit 07626ea9e5

View File

@ -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;
}