]> git.ipfire.org Git - thirdparty/openssl.git/commitdiff
apps/lib/apps.c load_key_certs_crls() refactor uidata use and tweak error message
authorDr. David von Oheimb <dev@ddvo.net>
Mon, 14 Apr 2025 19:01:25 +0000 (21:01 +0200)
committerDr. David von Oheimb <dev@ddvo.net>
Wed, 7 Jan 2026 11:56:15 +0000 (12:56 +0100)
Reviewed-by: Dmitry Belyavskiy <beldmit@gmail.com>
Reviewed-by: Norbert Pocs <norbertp@openssl.org>
Reviewed-by: Paul Dale <paul.dale@oracle.com>
(Merged from https://github.com/openssl/openssl/pull/28477)

apps/lib/apps.c

index e7a1791731c2c74ba00b23860ae96f4164529bc6..e57ac3398ee06063848cdca05a059996677ce13d 100644 (file)
@@ -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) {