sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
authorJan Stancek <jstancek@redhat.com>
Fri, 12 Jul 2024 07:11:15 +0000 (09:11 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 25 Apr 2025 08:45:58 +0000 (10:45 +0200)
commitf8dafdafddcf5ebf58658e89f8c003217e961e8c
tree373055920d00aac6adc899a63ae2d6009df29c82
parent1e2d849efc3225398cfb18fb5d9232fa6ab4851c
sign-file,extract-cert: avoid using deprecated ERR_get_error_line()

commit 467d60eddf55588add232feda325da7215ddaf30 upstream.

ERR_get_error_line() is deprecated since OpenSSL 3.0.

Use ERR_peek_error_line() instead, and combine display_openssl_errors()
and drain_openssl_errors() to a single function where parameter decides
if it should consume errors silently.

Signed-off-by: Jan Stancek <jstancek@redhat.com>
Reviewed-by: Jarkko Sakkinen <jarkko@kernel.org>
Tested-by: R Nageswara Sastry <rnsastry@linux.ibm.com>
Reviewed-by: Neal Gompa <neal@gompa.dev>
Signed-off-by: Jarkko Sakkinen <jarkko@kernel.org>
Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
certs/extract-cert.c
scripts/sign-file.c
scripts/ssl-common.h