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

From: Jarkko Sakkinen
Date: Mon Aug 29 2022 - 08:32:39 EST


On Sun, Aug 28, 2022 at 11:48:59AM +0530, Dhanuka Warusadura wrote:
> 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
>

Reviewed-by: Jarkko Sakkinen <jarkko@xxxxxxxxxx>

BR, Jarkko