From fa0cc6602b36fee0d36aee9bb8ef94dbff864eeb Mon Sep 17 00:00:00 2001 From: David Shaw Date: Sun, 20 Jul 2003 17:09:43 +0000 Subject: [PATCH] * keyedit.c (show_key_with_all_names): Use list-option show-validity in --edit-key interface as well. --- g10/ChangeLog | 5 +++++ g10/keyedit.c | 8 ++++++++ 2 files changed, 13 insertions(+) diff --git a/g10/ChangeLog b/g10/ChangeLog index cc669274e..add119054 100644 --- a/g10/ChangeLog +++ b/g10/ChangeLog @@ -1,3 +1,8 @@ +2003-07-20 David Shaw + + * keyedit.c (show_key_with_all_names): Use list-option + show-validity in --edit-key interface as well. + 2003-07-19 David Shaw * options.h, g10.c (main), mainproc.c (check_sig_and_print): Add diff --git a/g10/keyedit.c b/g10/keyedit.c index 9c6e8f081..68f71d6f8 100644 --- a/g10/keyedit.c +++ b/g10/keyedit.c @@ -1980,6 +1980,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, int i, rc; int do_warn = 0; byte pk_version=0; + PKT_public_key *primary=NULL; if (opt.with_colons) { @@ -2010,6 +2011,7 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, } pk_version=pk->version; + primary=pk; } if(with_revoker) { @@ -2095,6 +2097,9 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, g10_errstr(rc) ); } } + + assert(primary); + /* the user ids */ i = 0; for( node = keyblock; node; node = node->next ) { @@ -2102,6 +2107,9 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker, 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) + tty_printf("[%8.8s] ", + trust_value_to_string(get_validity(primary,uid))); if( only_marked ) tty_printf(" "); else if( node->flag & NODFLG_SELUID )