aboutsummaryrefslogtreecommitdiffstats
path: root/g10/keylist.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-08-23 10:50:41 +0000
committerWerner Koch <[email protected]>2019-08-23 10:50:41 +0000
commitd7aca1bef68589134b36395901b92496a7a37392 (patch)
treee496c2da587fde8221bbce3bbd47e8d3307868ad /g10/keylist.c
parentgpg: Do not show two informational diagnostics with quiet. (diff)
downloadgnupg-d7aca1bef68589134b36395901b92496a7a37392.tar.gz
gnupg-d7aca1bef68589134b36395901b92496a7a37392.zip
gpg: Silence some warning messages during -Kv.
* g10/options.h (glo_ctrl): Add flag silence_parse_warnings. * g10/keylist.c (list_all): Set that during secret key listsings. * g10/parse-packet.c (unknown_pubkey_warning): If new flag is set do not print info message normally emitted inh verbose mode. (can_handle_critical_notation, enum_sig_subpkt): Ditto. (parse_signature, parse_key, parse_attribute_subpkts): Ditto. -- Those messages are annoying because they might be emitted due to parsing public keys which are latter not shows because the secret part is missing. No functional regressions are expected because --verbose should not change anything. Note that this suppression is only done if no arguments are given to the command; that is if a listing of the entire keyring is requested. Thus to see the earnings anyway, a listing of a single or group of keys can be requested. GnuPG-bug-id: 4627 Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'g10/keylist.c')
-rw-r--r--g10/keylist.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/g10/keylist.c b/g10/keylist.c
index 1274775d2..801568adb 100644
--- a/g10/keylist.c
+++ b/g10/keylist.c
@@ -542,7 +542,11 @@ list_all (ctrl_t ctrl, int secret, int mark_secret)
lastresname = NULL;
do
{
+ if (secret)
+ glo_ctrl.silence_parse_warnings++;
rc = keydb_get_keyblock (hd, &keyblock);
+ if (secret)
+ glo_ctrl.silence_parse_warnings--;
if (rc)
{
if (gpg_err_code (rc) == GPG_ERR_LEGACY_KEY)