diff options
| author | Jan Stancek <[email protected]> | 2024-07-12 07:11:15 +0000 |
|---|---|---|
| committer | Jarkko Sakkinen <[email protected]> | 2024-09-20 16:49:52 +0000 |
| commit | 467d60eddf55588add232feda325da7215ddaf30 (patch) | |
| tree | b10dffcbd6a4d96315fe01ddfbec018479236a64 /scripts/sign-file.c | |
| parent | sign-file,extract-cert: move common SSL helper functions to a header (diff) | |
| download | kernel-467d60eddf55588add232feda325da7215ddaf30.tar.gz kernel-467d60eddf55588add232feda325da7215ddaf30.zip | |
sign-file,extract-cert: avoid using deprecated ERR_get_error_line()
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 <[email protected]>
Reviewed-by: Jarkko Sakkinen <[email protected]>
Tested-by: R Nageswara Sastry <[email protected]>
Reviewed-by: Neal Gompa <[email protected]>
Signed-off-by: Jarkko Sakkinen <[email protected]>
Diffstat (limited to 'scripts/sign-file.c')
| -rw-r--r-- | scripts/sign-file.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/scripts/sign-file.c b/scripts/sign-file.c index 39ba58db5d4e..bb3fdf1a617c 100644 --- a/scripts/sign-file.c +++ b/scripts/sign-file.c @@ -114,11 +114,11 @@ static EVP_PKEY *read_private_key(const char *private_key_name) ENGINE *e; ENGINE_load_builtin_engines(); - drain_openssl_errors(); + drain_openssl_errors(__LINE__, 1); e = ENGINE_by_id("pkcs11"); ERR(!e, "Load PKCS#11 ENGINE"); if (ENGINE_init(e)) - drain_openssl_errors(); + drain_openssl_errors(__LINE__, 1); else ERR(1, "ENGINE_init"); if (key_pass) @@ -273,7 +273,7 @@ int main(int argc, char **argv) /* Digest the module data. */ OpenSSL_add_all_digests(); - display_openssl_errors(__LINE__); + drain_openssl_errors(__LINE__, 0); digest_algo = EVP_get_digestbyname(hash_algo); ERR(!digest_algo, "EVP_get_digestbyname"); |
