Don't print anonymous recipient messages in quiet mode.
authorWerner Koch <wk@gnupg.org>
Tue, 22 Nov 2011 14:30:26 +0000 (15:30 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 22 Nov 2011 14:30:26 +0000 (15:30 +0100)
This is bug#1378.

g10/ChangeLog
g10/pubkey-enc.c

index 8928780..c799fc9 100644 (file)
@@ -1,3 +1,8 @@
+2011-11-22  Werner Koch  <wk@g10code.com>
+
+       * pubkey-enc.c (get_session_key): Don't print anonymous recipient
+       messages in quiet mode.  This is bug#1378.
+
 2011-11-06  Werner Koch  <wk@g10code.com>
 
        * card-util.c (generate_card_keys): Add arg CTRL.
index 680182b..a0fe685 100644 (file)
@@ -110,13 +110,15 @@ get_session_key (PKT_pubkey_enc * k, DEK * dek)
           if (!(sk->pubkey_usage & PUBKEY_USAGE_ENC))
             continue;
           keyid_from_pk (sk, keyid);
-          log_info (_("anonymous recipient; trying secret key %s ...\n"),
-                    keystr (keyid));
+          if (!opt.quiet)
+            log_info (_("anonymous recipient; trying secret key %s ...\n"),
+                      keystr (keyid));
 
           rc = get_it (k, dek, sk, keyid);
           if (!rc)
             {
-              log_info (_("okay, we are the anonymous recipient.\n"));
+              if (!opt.quiet)
+                log_info (_("okay, we are the anonymous recipient.\n"));
               break;
             }
           else if (gpg_err_code (rc) == GPG_ERR_FULLY_CANCELED)