diff options
author | Andrea Grandi <andrea.grandi@intel.com> | 2016-05-03 03:24:48 +0100 |
---|---|---|
committer | Matt Caswell <matt@openssl.org> | 2016-05-09 10:32:18 +0100 |
commit | 447402e628b15861233456736eaec6f9cb2994bf (patch) | |
tree | 51fcb879f6b3003e5844b787948eaaf481e3f8f2 /apps/speed.c | |
parent | fbdf0299dc98bc611d854c0a62c6ab1810d856fc (diff) |
Fix error in the loop of ECDH
The tests was incorrectly repeated multiple times when using the
async_jobs options
Reviewed-by: Kurt Roeckx <kurt@openssl.org>
Reviewed-by: Matt Caswell <matt@openssl.org>
Diffstat (limited to 'apps/speed.c')
-rw-r--r-- | apps/speed.c | 28 |
1 files changed, 14 insertions, 14 deletions
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; } } |