]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
Avoid erroneous diagnostics in speed measuring
authorDmitry Belyavskiy <beldmit@gmail.com>
Thu, 16 Feb 2023 10:23:09 +0000 (11:23 +0100)
committerPauli <pauli@openssl.org>
Tue, 14 Mar 2023 21:46:54 +0000 (08:46 +1100)
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)

apps/speed.c

index b647e2022b4d77565e1b8904187cbf610b13e91d..5d4b389da69e31f8e27e7e606f5763601dcb9e38 100644 (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;
 }