[PATCH] selftests/sgx: Fix OpenSSL deprecated warning for ERR_get_error_line

From: Dhanuka Warusadura
Date: Sun Aug 28 2022 - 02:20:03 EST


These changes fix the "error: ‘ERR_get_error_line’ is deprecated:
Since OpenSSL 3.0" warning.

Signed-off-by: Dhanuka Warusadura <wdnuka@xxxxxxxxx>
---
tools/testing/selftests/sgx/sigstruct.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/testing/selftests/sgx/sigstruct.c b/tools/testing/selftests/sgx/sigstruct.c
index 50c5ab1aa6fa..671d9b58e274 100644
--- a/tools/testing/selftests/sgx/sigstruct.c
+++ b/tools/testing/selftests/sgx/sigstruct.c
@@ -136,7 +136,7 @@ static bool check_crypto_errors(void)
break;

had_errors = true;
- err = ERR_get_error_line(&filename, &line);
+ err = ERR_peek_last_error_line(&filename, &line);
ERR_error_string_n(err, str, sizeof(str));
fprintf(stderr, "crypto: %s: %s:%d\n", str, filename, line);
}
--
2.37.2