diff options
author | Werner Koch <[email protected]> | 2024-09-30 16:33:26 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2024-09-30 16:33:26 +0000 |
commit | 819085364238b2d078580068b92b477a3c0d3e9a (patch) | |
tree | b4ed1818ffa2b6d382b819d91b231bad055d47cb /sm/certchain.c | |
parent | gpgsm: Use a cache to speed up parent certificate lookup. (diff) | |
download | gnupg-819085364238b2d078580068b92b477a3c0d3e9a.tar.gz gnupg-819085364238b2d078580068b92b477a3c0d3e9a.zip |
gpgsm: Silence the fingerprint output in quiet mode.
* sm/certchain.c (ask_marktrusted): Avoid fingerprint printing in
quiet mode
--
And also don't print it anymore after the agent told us that the
feature has been disabled.
Diffstat (limited to 'sm/certchain.c')
-rw-r--r-- | sm/certchain.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/sm/certchain.c b/sm/certchain.c index a9c541fb7..a6dd9c3f8 100644 --- a/sm/certchain.c +++ b/sm/certchain.c @@ -1527,13 +1527,17 @@ ask_marktrusted (ctrl_t ctrl, ksba_cert_t cert, int listmode) { static int no_more_questions; int rc; - char *fpr; int success = 0; - fpr = gpgsm_get_fingerprint_string (cert, GCRY_MD_SHA1); - es_fflush (es_stdout); - log_info (_("fingerprint=%s\n"), fpr? fpr : "?"); - xfree (fpr); + if (opt.quiet || no_more_questions) + es_fflush (es_stdout); + else + { + char *fpr = gpgsm_get_fingerprint_string (cert, GCRY_MD_SHA1); + es_fflush (es_stdout); + log_info (_("fingerprint=%s\n"), fpr? fpr : "?"); + xfree (fpr); + } if (no_more_questions) rc = gpg_error (GPG_ERR_NOT_SUPPORTED); |