[git] GnuPG - branch, master, updated. gnupg-2.1.9-157-gb64b33b

by Neal H. Walfield cvs at cvs.gnupg.org
Mon Nov 23 12:16:44 CET 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".

The branch, master has been updated
       via  b64b33bb80a8cf5dcc1fdbc62023d019fe2c8cb1 (commit)
      from  19f099463c82c119288a05eaefc42bf09d617377 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit b64b33bb80a8cf5dcc1fdbc62023d019fe2c8cb1
Author: Neal H. Walfield <neal at g10code.com>
Date:   Mon Nov 23 12:16:33 2015 +0100

    gpg: Allow updating the expiration time of multiple subkeys at once.
    
    * g10/keyedit.c (menu_expire): Allow updating the expiration time of
    multiple subkeys at once.
    
    --
    Signed-off-by: Neal H. Walfield <neal at g10code.com>
    GnuPG-bug-id: 1944

diff --git a/g10/keyedit.c b/g10/keyedit.c
index 8320aa4..1511c17 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -4003,8 +4003,23 @@ menu_expire (KBNODE pub_keyblock)
   n1 = count_selected_keys (pub_keyblock);
   if (n1 > 1)
     {
-      tty_printf (_("Please select at most one subkey.\n"));
-      return 0;
+      char *s = xtryasprintf (_("Are you sure you want to change the"
+                                " expiration time %d subkeys? (y/N) "), n1);
+      int s_need_free;
+      if (s)
+        s_need_free = 0;
+      else
+        {
+          s = _("Are you sure you want to change the"
+                " expiration time for multiple subkeys? (y/N) ");
+          s_need_free = 0;
+        }
+
+      rc = cpr_get_answer_is_yes ("keyedit.expire_multiple_subkeys.okay", s);
+      if (s_need_free)
+        xfree (s);
+      if (! rc)
+	return 0;
     }
   else if (n1)
     tty_printf (_("Changing expiration time for a subkey.\n"));
@@ -4029,11 +4044,15 @@ menu_expire (KBNODE pub_keyblock)
 	  keyid_from_pk (main_pk, keyid);
 	  main_pk->expiredate = expiredate;
 	}
-      else if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY
-	       && (node->flag & NODFLG_SELKEY))
+      else if (node->pkt->pkttype == PKT_PUBLIC_SUBKEY)
 	{
-	  sub_pk = node->pkt->pkt.public_key;
-	  sub_pk->expiredate = expiredate;
+          if (node->flag & NODFLG_SELKEY)
+            {
+              sub_pk = node->pkt->pkt.public_key;
+              sub_pk->expiredate = expiredate;
+            }
+          else
+            sub_pk = NULL;
 	}
       else if (node->pkt->pkttype == PKT_USER_ID)
 	uid = node->pkt->pkt.user_id;

-----------------------------------------------------------------------

Summary of changes:
 g10/keyedit.c | 31 +++++++++++++++++++++++++------
 1 file changed, 25 insertions(+), 6 deletions(-)


hooks/post-receive
-- 
The GNU Privacy Guard
http://git.gnupg.org




More information about the Gnupg-commits mailing list