summaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2020-08-29 20:38:25 +0200
committerRichard Levitte <levitte@openssl.org>2020-09-03 17:48:32 +0200
commit88c1d0c1daa93571570cdaac04bb9e3dae8b971f (patch)
tree664e2ba5cb839588e83f21037b34cbf831744b4e /test
parentc2150f73571fbcf150d0a7e5eaef537fd43857fa (diff)
TEST: have key_unsupported() in evp_test.c look at the last error
key_unsupported() looked at the first error in the queue to see if a key algorithm is supported or not. However, there are situations where the errors it looks for is preceded by others. It's much safer to look at the last recorded error. Reviewed-by: Matt Caswell <matt@openssl.org> (Merged from https://github.com/openssl/openssl/pull/12587)
Diffstat (limited to 'test')
-rw-r--r--test/evp_test.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/evp_test.c b/test/evp_test.c
index 238bbaf3d5..d5ec08c469 100644
--- a/test/evp_test.c
+++ b/test/evp_test.c
@@ -3253,7 +3253,7 @@ static void free_key_list(KEY_LIST *lst)
*/
static int key_unsupported(void)
{
- long err = ERR_peek_error();
+ long err = ERR_peek_last_error();
if (ERR_GET_LIB(err) == ERR_LIB_EVP
&& (ERR_GET_REASON(err) == EVP_R_UNSUPPORTED_ALGORITHM