]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
repart: Fix OpenSSL UI
authorDaanDeMeyer <daan.j.demeyer@gmail.com>
Tue, 23 Dec 2025 16:24:01 +0000 (17:24 +0100)
committerDaan De Meyer <daan.j.demeyer@gmail.com>
Tue, 23 Dec 2025 19:55:32 +0000 (20:55 +0100)
Follow up for 0158eabb01d19b6901b5c3af7d8863b73e93dc73

src/repart/repart.c

index 8768375d4757a23811d7403709759f3a9f21b2b5..e3a6e7efafe8bedfd8334e5e52deb26d42c4ec85 100644 (file)
@@ -538,6 +538,7 @@ struct Context {
 
 #if HAVE_OPENSSL
         X509 *certificate;
+        OpenSSLAskPasswordUI *ui;
         EVP_PKEY *private_key;
 #endif
 
@@ -948,6 +949,7 @@ static Context* context_free(Context *context) {
 
 #if HAVE_OPENSSL
         X509_free(context->certificate);
+        openssl_ask_password_ui_free(context->ui);
         EVP_PKEY_free(context->private_key);
 #endif
 
@@ -8913,7 +8915,7 @@ static int context_load_keys(Context *context) {
                                         .hup_fd = -EBADF,
                                 },
                                 &context->private_key,
-                                /* ret_user_interface= */ NULL);
+                                &context->ui);
                 if (r < 0)
                         return log_error_errno(r, "Failed to load private key from %s: %m", arg_private_key);
         }