From: Richard Levitte Date: Wed, 9 Jun 2021 09:00:00 +0000 (+0200) Subject: test/evp_extra_test.c: Peek at the error instead of getting it. X-Git-Tag: openssl-3.0.0-beta1~40 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=5d8ad7d385f1be0d2ef6fd3bfc91debdf3835c96;p=thirdparty%2Fopenssl.git test/evp_extra_test.c: Peek at the error instead of getting it. If there is an error report, we want to get it printed too. Reviewed-by: Matt Caswell Reviewed-by: Tomas Mraz (Merged from https://github.com/openssl/openssl/pull/15604) --- diff --git a/test/evp_extra_test.c b/test/evp_extra_test.c index 33bb698ff37..f10e0077ecb 100644 --- a/test/evp_extra_test.c +++ b/test/evp_extra_test.c @@ -1294,7 +1294,7 @@ static int test_EVP_PKCS82PKEY_wrong_tag(void) || !TEST_int_gt(BIO_get_mem_data(membio, &membuf), 0) || !TEST_ptr(p8inf = d2i_PKCS8_PRIV_KEY_INFO_bio(membio, NULL)) || !TEST_ptr(pkey2 = EVP_PKCS82PKEY(p8inf)) - || !TEST_int_eq(ERR_get_error(), 0)) { + || !TEST_int_eq(ERR_peek_last_error(), 0)) { goto done; }