From cb5f4aba57dc29271aeb2fa2799bf17c8078adbe Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 14 Oct 2024 16:46:27 +0200 Subject: [PATCH] dirmngr: Print a brief list of URLs with LISTCRLS. * dirmngr/crlcache.c (crl_cache_list): Print a summary of URLs. * sm/call-dirmngr.c (gpgsm_dirmngr_run_command): Print a notice to stdout if the dirmngr has been disabled. -- GnuPG-bug-id: 7337 --- NEWS | 3 +++ dirmngr/crlcache.c | 5 +++++ sm/call-dirmngr.c | 2 ++ 3 files changed, 10 insertions(+) diff --git a/NEWS b/NEWS index 973c6fdbf..b5bcf6526 100644 --- a/NEWS +++ b/NEWS @@ -27,6 +27,9 @@ Noteworthy changes in version 2.2.45 (unreleased) * agent: Fix KEYTOCARD for the use case with loopback pinentry. [T7283] + * dirmngr: A list of used URLs for loaded CRLs is printed first in + the output of the LISTCRL command. [T7337] + * gpgconf: Allow listing of options --trusted-key, add-desig-revoker, and default-new-key-adsk. [T6882] diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c index cc5300df7..8c2ffc030 100644 --- a/dirmngr/crlcache.c +++ b/dirmngr/crlcache.c @@ -2637,6 +2637,11 @@ crl_cache_list (estream_t fp) crl_cache_entry_t entry; gpg_error_t err = 0; + for (entry = cache->entries; + entry && !entry->deleted; + entry = entry->next ) + es_fprintf (fp, "URL: %s\n", entry->url ); + for (entry = cache->entries; entry && !entry->deleted && !err; entry = entry->next ) diff --git a/sm/call-dirmngr.c b/sm/call-dirmngr.c index 0bd805e1b..e454c52d5 100644 --- a/sm/call-dirmngr.c +++ b/sm/call-dirmngr.c @@ -1080,6 +1080,8 @@ gpgsm_dirmngr_run_command (ctrl_t ctrl, const char *command, keydb_close_all_files (); rc = start_dirmngr (ctrl); + if (gpg_err_code (rc) == GPG_ERR_NO_DIRMNGR) + fputs (_("no dirmngr running in this session\n"), stdout); if (rc) return rc;