aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2005-08-27 02:56:51 +0000
committerDavid Shaw <[email protected]>2005-08-27 02:56:51 +0000
commit752d64bffc397fdf84523997c240219e906211b5 (patch)
tree6cbc74d36675ae9cc328a2d2d897166cd4d5a45f
parent* ksutil.h, ksutil.c (parse_ks_options): Remove exact-name and (diff)
downloadgnupg-752d64bffc397fdf84523997c240219e906211b5.tar.gz
gnupg-752d64bffc397fdf84523997c240219e906211b5.zip
* keyedit.c (ask_revoke_sig): Add a revsig --with-colons mode.
Suggested by Michael Schierl.
-rw-r--r--g10/ChangeLog5
-rw-r--r--g10/keyedit.c35
2 files changed, 31 insertions, 9 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index 7b136b073..bfc6334a5 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,8 @@
+2005-08-26 David Shaw <[email protected]>
+
+ * keyedit.c (ask_revoke_sig): Add a revsig --with-colons mode.
+ Suggested by Michael Schierl.
+
2005-08-21 David Shaw <[email protected]>
* Makefile.am: No need to link with curl any longer.
diff --git a/g10/keyedit.c b/g10/keyedit.c
index 2b8bede46..8712c4bcf 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -2377,7 +2377,6 @@ show_prefs (PKT_user_id *uid, PKT_signature *selfsig, int verbose)
}
}
-
/* 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 @@ static void
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 @@ ask_revoke_sig( KBNODE keyblock, KBNODE node )
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;
+
+ 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, ':');
+ }
- tty_printf(_("signed by your key %s on %s%s%s\n"),
- keystr(sig->keyid),datestr_from_sig(sig),
- sig->flags.exportable?"":_(" (non-exportable)"),"");
+ 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"),