aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Shaw <[email protected]>2003-09-24 12:11:17 +0000
committerDavid Shaw <[email protected]>2003-09-24 12:11:17 +0000
commit0d8bd2eace558d8015995169fc2b8907e2dac7d0 (patch)
tree2ef40c52ef387dc0b3ee15e26f9a64e4c35d75eb
parent* sign.c (mk_notation_policy_etc): Capitalize "URL". (diff)
downloadgnupg-0d8bd2eace558d8015995169fc2b8907e2dac7d0.tar.gz
gnupg-0d8bd2eace558d8015995169fc2b8907e2dac7d0.zip
* keyedit.c (show_key_with_all_names): Show names a little neater by
putting the [revoked] or [expired] in the space used for the [validity]. There is also no point in showing "[unknown] [revoked]".
Diffstat (limited to '')
-rw-r--r--g10/ChangeLog7
-rw-r--r--g10/keyedit.c26
2 files changed, 27 insertions, 6 deletions
diff --git a/g10/ChangeLog b/g10/ChangeLog
index c76124196..a7b2b0b62 100644
--- a/g10/ChangeLog
+++ b/g10/ChangeLog
@@ -1,3 +1,10 @@
+2003-09-24 David Shaw <[email protected]>
+
+ * keyedit.c (show_key_with_all_names): Show names a little neater
+ by putting the [revoked] or [expired] in the space used for the
+ [validity]. There is also no point in showing "[unknown]
+ [revoked]".
+
2003-09-23 David Shaw <[email protected]>
* sign.c (mk_notation_policy_etc): Capitalize "URL".
diff --git a/g10/keyedit.c b/g10/keyedit.c
index d9506d721..633209eed 100644
--- a/g10/keyedit.c
+++ b/g10/keyedit.c
@@ -2001,7 +2001,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
{
KBNODE node;
int i, rc;
- int do_warn = 0;
+ int do_warn = 0, indent=0;
byte pk_version=0;
PKT_public_key *primary=NULL;
@@ -2130,15 +2130,33 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
}
/* the user ids */
+
+ for( node = keyblock; node; node = node->next )
+ {
+ if(node->pkt->pkttype == PKT_USER_ID
+ && (node->pkt->pkt.user_id->is_revoked
+ || node->pkt->pkt.user_id->is_expired))
+ {
+ indent=1;
+ break;
+ }
+ }
+
i = 0;
for( node = keyblock; node; node = node->next ) {
if( node->pkt->pkttype == PKT_USER_ID ) {
PKT_user_id *uid = node->pkt->pkt.user_id;
++i;
if( !only_marked || (only_marked && (node->flag & NODFLG_MARK_A))){
- if(opt.list_options&LIST_SHOW_VALIDITY && primary)
+ if(uid->is_revoked)
+ tty_printf("[%8.8s] ",_("revoked"));
+ else if(uid->is_expired)
+ tty_printf("[%8.8s] ",_("expired"));
+ else if(opt.list_options&LIST_SHOW_VALIDITY && primary)
tty_printf("[%8.8s] ",
trust_value_to_string(get_validity(primary,uid)));
+ else if(indent)
+ tty_printf(" ");
if( only_marked )
tty_printf(" ");
else if( node->flag & NODFLG_SELUID )
@@ -2147,10 +2165,6 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
tty_printf("(%d). ", i);
else
tty_printf("(%d) ", i);
- if ( uid->is_revoked )
- tty_printf (_("[revoked] "));
- if ( uid->is_expired )
- tty_printf (_("[expired] "));
tty_print_utf8_string( uid->name, uid->len );
tty_printf("\n");
if( with_prefs )