From 7b2748c6d8fb33e390a3bec9ae9da7679fb59aa6 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 5 Dec 2024 16:32:25 +0100 Subject: [PATCH] gpg: Silence expired trusted-key diagnostics in quiet mode. * g10/trustdb.c (validate_keys): Take care of --quiet. -- GnuPG-bug-id: 7351 --- NEWS | 4 ++++ g10/trustdb.c | 10 ++++++---- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/NEWS b/NEWS index faa122c83..9a50d3adf 100644 --- a/NEWS +++ b/NEWS @@ -2,6 +2,10 @@ Noteworthy changes in version 2.5.3 (unreleased) ------------------------------------------------ + See-also: gnupg-announce/2024q4/000xxx.html + Release-info: https://dev.gnupg.org/T7442 + + Noteworthy changes in version 2.5.2 (2024-12-05) ------------------------------------------------ diff --git a/g10/trustdb.c b/g10/trustdb.c index 7dc1c8f38..9c26a8336 100644 --- a/g10/trustdb.c +++ b/g10/trustdb.c @@ -2240,15 +2240,17 @@ validate_keys (ctrl_t ctrl, int interactive) keyblock = get_pubkeyblock (ctrl, k->kid); if (!keyblock) { - log_info (_("Note: ultimately trusted key %s not found\n"), - keystr(k->kid)); + if (!opt.quiet) + log_info (_("Note: ultimately trusted key %s not found\n"), + keystr(k->kid)); continue; } pk = keyblock->pkt->pkt.public_key; if (pk->has_expired) { - log_info (_("Note: ultimately trusted key %s expired\n"), - keystr(k->kid)); + if (!opt.quiet) + log_info (_("Note: ultimately trusted key %s expired\n"), + keystr(k->kid)); continue; }