Handle "int_ctx_new:unsupported algorithm" error
authorNicola Tuveri <nic.tuv@gmail.com>
Fri, 7 Oct 2016 14:23:17 +0000 (17:23 +0300)
committerRich Salz <rsalz@openssl.org>
Thu, 17 Nov 2016 05:36:23 +0000 (00:36 -0500)
commit86ff6cc6b2f2718fadbdc2a2c7add51949bcd4a4
treee2e44255aed8e9d283620a878db06831e2a31b1b
parentb756d694b6edb97a2827d97591e486f4096f0cd3
Handle "int_ctx_new:unsupported algorithm" error

Calling EVP_PKEY_CTX_new_id(curve_NID, NULL) causes an error for most
curves that are implemented through the EC low-level API, and in the
last commit we call it for every curve to avoid treating X25519 as a
special case.

Last commit code already handles correctly this failure, but does not
remove these events from the thread error queue, thus some
false-positive warnings are printed at the end of execution.

This commit ensures that the error queue is clean, without flushing
other errors.

Reviewed-by: Richard Levitte <levitte@openssl.org>
Reviewed-by: Rich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/1658)
apps/speed.c