[svn] GnuPG - r5129 - trunk/g10

svn author wk cvs at cvs.gnupg.org
Wed Aug 26 08:46:02 CEST 2009


Author: wk
Date: 2009-08-26 08:46:02 +0200 (Wed, 26 Aug 2009)
New Revision: 5129

Modified:
   trunk/g10/ChangeLog
   trunk/g10/keyedit.c
Log:
Fix debian bug#543530


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2009-08-25 20:19:37 UTC (rev 5128)
+++ trunk/g10/ChangeLog	2009-08-26 06:46:02 UTC (rev 5129)
@@ -1,3 +1,8 @@
+2009-08-26  Werner Koch  <wk at g10code.com>
+
+	* keyedit.c (menu_revsig): Check for signature right away.  Fix
+	Debian-bug#543530.
+
 2009-08-20  Daiki Ueno  <ueno at unixuser.org>
 
 	* mainproc.c (proc_encrypted): Clear passphrase cached with S2K

Modified: trunk/g10/keyedit.c
===================================================================
--- trunk/g10/keyedit.c	2009-08-25 20:19:37 UTC (rev 5128)
+++ trunk/g10/keyedit.c	2009-08-26 06:46:02 UTC (rev 5129)
@@ -4719,6 +4719,36 @@
 
     assert(keyblock->pkt->pkttype==PKT_PUBLIC_KEY);
 
+    /* First check whether we have any signatures at all.  */
+    any = 0;
+    for (node = keyblock; node; node = node->next ) 
+      {
+	node->flag &= ~(NODFLG_SELSIG | NODFLG_MARK_A);
+	if (node->pkt->pkttype == PKT_USER_ID) {
+          if (node->flag&NODFLG_SELUID || all)
+            skip = 0;
+          else
+            skip = 1;
+	}
+	else if (!skip && node->pkt->pkttype == PKT_SIGNATURE
+                 && ((sig = node->pkt->pkt.signature),
+                     !seckey_available(sig->keyid)     ))
+	  {
+	    if ((sig->sig_class&~3) == 0x10)
+	      {
+                any = 1;
+                break;
+              }
+	  }
+      }
+
+    if (!any)
+      {
+        tty_printf (_("Not signed by you.\n"));
+        return 0;
+      }
+    
+
     /* FIXME: detect duplicates here  */
     tty_printf(_("You have signed these user IDs on key %s:\n"),
 	       keystr_from_pk(keyblock->pkt->pkt.public_key));




More information about the Gnupg-commits mailing list