[svn] GnuPG - r3875 - trunk/g10

svn author dshaw cvs at cvs.gnupg.org
Sat Aug 27 04:56:52 CEST 2005


Author: dshaw
Date: 2005-08-27 04:56:51 +0200 (Sat, 27 Aug 2005)
New Revision: 3875

Modified:
   trunk/g10/ChangeLog
   trunk/g10/keyedit.c
Log:
* keyedit.c (ask_revoke_sig): Add a revsig --with-colons mode.
Suggested by Michael Schierl.


Modified: trunk/g10/ChangeLog
===================================================================
--- trunk/g10/ChangeLog	2005-08-26 04:24:46 UTC (rev 3874)
+++ trunk/g10/ChangeLog	2005-08-27 02:56:51 UTC (rev 3875)
@@ -1,3 +1,8 @@
+2005-08-26  David Shaw  <dshaw at jabberwocky.com>
+
+	* keyedit.c (ask_revoke_sig): Add a revsig --with-colons mode.
+	Suggested by Michael Schierl.
+
 2005-08-21  David Shaw  <dshaw at jabberwocky.com>
 
 	* Makefile.am: No need to link with curl any longer.

Modified: trunk/g10/keyedit.c
===================================================================
--- trunk/g10/keyedit.c	2005-08-26 04:24:46 UTC (rev 3874)
+++ trunk/g10/keyedit.c	2005-08-27 02:56:51 UTC (rev 3875)
@@ -2377,7 +2377,6 @@
     }
 }
 
-
 /* This is the version of show_key_with_all_names used when
    opt.with_colons is used.  It prints all available data in a easy to
    parse format and does not translate utf8 */
@@ -4189,7 +4188,7 @@
 ask_revoke_sig( KBNODE keyblock, KBNODE node )
 {
     int doit=0;
-    char *p;
+    PKT_user_id *uid;
     PKT_signature *sig = node->pkt->pkt.signature;
     KBNODE unode = find_prev_kbnode( keyblock, node, PKT_USER_ID );
 
@@ -4198,15 +4197,33 @@
 	return;
     }
 
-    p=utf8_to_native(unode->pkt->pkt.user_id->name,
-		     unode->pkt->pkt.user_id->len,0);
-    tty_printf(_("user ID: \"%s\"\n"),p);
-    xfree(p);
+    uid=unode->pkt->pkt.user_id;
 
-    tty_printf(_("signed by your key %s on %s%s%s\n"),
-	       keystr(sig->keyid),datestr_from_sig(sig),
-	       sig->flags.exportable?"":_(" (non-exportable)"),"");
+    if(opt.with_colons)
+      {
+	if(uid->attrib_data)
+	  printf("uat:::::::::%u %lu",uid->numattribs,uid->attrib_len);
+	else
+	  {
+	    printf("uid:::::::::");
+	    print_string (stdout, uid->name, uid->len, ':');
+	  }
 
+	printf("\n");
+
+	print_and_check_one_sig_colon(keyblock,node,NULL,NULL,NULL,NULL,1);
+      }
+    else
+      {
+	char *p=utf8_to_native(unode->pkt->pkt.user_id->name,
+			 unode->pkt->pkt.user_id->len,0);
+	tty_printf(_("user ID: \"%s\"\n"),p);
+	xfree(p);
+
+	tty_printf(_("signed by your key %s on %s%s%s\n"),
+		   keystr(sig->keyid),datestr_from_sig(sig),
+		   sig->flags.exportable?"":_(" (non-exportable)"),"");
+      }
     if(sig->flags.expired)
       {
 	tty_printf(_("This signature expired on %s.\n"),




More information about the Gnupg-commits mailing list