From: Andrea Grandi Date: Tue, 3 May 2016 02:24:48 +0000 (+0100) Subject: Fix error in the loop of ECDH X-Git-Tag: OpenSSL_1_1_0-pre6~897 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=447402e628b15861233456736eaec6f9cb2994bf;p=oweals%2Fopenssl.git Fix error in the loop of ECDH The tests was incorrectly repeated multiple times when using the async_jobs options Reviewed-by: Kurt Roeckx Reviewed-by: Matt Caswell --- diff --git a/apps/speed.c b/apps/speed.c index 160841d040..aeb2352f5f 100644 --- a/apps/speed.c +++ b/apps/speed.c @@ -2650,20 +2650,20 @@ int speed_main(int argc, char **argv) break; } } - if (ecdh_checks != 0) { - pkey_print_message("", "ecdh", - ecdh_c[testnum][0], - test_curves_bits[testnum], ECDH_SECONDS); - Time_F(START); - count = run_benchmark(async_jobs, ECDH_compute_key_loop, loopargs); - d = Time_F(STOP); - BIO_printf(bio_err, - mr ? "+R7:%ld:%d:%.2f\n" : - "%ld %d-bit ECDH ops in %.2fs\n", count, - test_curves_bits[testnum], d); - ecdh_results[testnum][0] = d / (double)count; - rsa_count = count; - } + } + if (ecdh_checks != 0) { + pkey_print_message("", "ecdh", + ecdh_c[testnum][0], + test_curves_bits[testnum], ECDH_SECONDS); + Time_F(START); + count = run_benchmark(async_jobs, ECDH_compute_key_loop, loopargs); + d = Time_F(STOP); + BIO_printf(bio_err, + mr ? "+R7:%ld:%d:%.2f\n" : + "%ld %d-bit ECDH ops in %.2fs\n", count, + test_curves_bits[testnum], d); + ecdh_results[testnum][0] = d / (double)count; + rsa_count = count; } }