From: Dr. David von Oheimb Date: Mon, 14 Apr 2025 19:01:25 +0000 (+0200) Subject: apps/lib/apps.c load_key_certs_crls() refactor uidata use and tweak error message X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=48d4c8fb8bfd2385dd14a353256ae04b438963be;p=thirdparty%2Fopenssl.git apps/lib/apps.c load_key_certs_crls() refactor uidata use and tweak error message Reviewed-by: Dmitry Belyavskiy Reviewed-by: Norbert Pocs Reviewed-by: Paul Dale (Merged from https://github.com/openssl/openssl/pull/28477) --- diff --git a/apps/lib/apps.c b/apps/lib/apps.c index e7a1791731c..e57ac3398ee 100644 --- a/apps/lib/apps.c +++ b/apps/lib/apps.c @@ -890,7 +890,7 @@ int load_key_certs_crls(const char *uri, int format, int maybe_stdin, X509_CRL **pcrl, STACK_OF(X509_CRL) **pcrls, EVP_SKEY **pskey) { - PW_CB_DATA uidata; + PW_CB_DATA uidata = { pass, uri }; OSSL_STORE_CTX *ctx = NULL; OSSL_LIB_CTX *libctx = app_get0_libctx(); const char *propq = app_get0_propq(); @@ -950,9 +950,6 @@ int load_key_certs_crls(const char *uri, int format, int maybe_stdin, SET_EXPECT(OSSL_STORE_INFO_CRL); } - uidata.password = pass; - uidata.prompt_info = uri; - if ((input_type = format2string(format)) != NULL) { itp[0] = OSSL_PARAM_construct_utf8_string(OSSL_STORE_PARAM_INPUT_TYPE, (char *)input_type, 0); @@ -1100,7 +1097,7 @@ end: pskey = NULL; failed = FAIL_NAME; if (failed != NULL && !quiet) - BIO_printf(bio_err, "Could not find"); + BIO_printf(bio_err, "Could not find or decode"); } if (failed != NULL && !quiet) {