[PATCH v3] g10: be --quiet about weak digests & rejected third-party key signatures
Robin H. Johnson
robbat2 at gentoo.org
Wed May 20 20:13:31 CEST 2020
Let --quiet hide the output about weak digests and rejected third-party
key signatures.
```
gpg: Note: third-party key signatures using the %s algorithm are rejected
Note: signatures using the %s algorithm are rejected
```
This does not change actual behavior, it just omits the notes instead.
This is primarily intended to be used in automation.
Signed-off-by: Robin H. Johnson <robbat2 at gentoo.org>
---
g10/misc.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git g10/misc.c g10/misc.c
index 22ed47e7c..ddf39d723 100644
--- g10/misc.c
+++ g10/misc.c
@@ -341,6 +341,10 @@ print_digest_rejected_note (enum gcry_md_algos algo)
{
struct weakhash* weak;
int show = 1;
+
+ if (opt.quiet)
+ return;
+
for (weak = opt.weak_digests; weak; weak = weak->next)
if (weak->algo == algo)
{
@@ -366,6 +370,8 @@ print_sha1_keysig_rejected_note (void)
{
static int shown;
+ if (opt.quiet)
+ return;
if (shown)
return;
--
2.26.2
More information about the Gnupg-devel
mailing list