* keyedit.c (show_key_with_all_names): Use list-option show-validity in
authorDavid Shaw <dshaw@jabberwocky.com>
Sun, 20 Jul 2003 17:09:43 +0000 (17:09 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sun, 20 Jul 2003 17:09:43 +0000 (17:09 +0000)
--edit-key interface as well.

g10/ChangeLog
g10/keyedit.c

index cc66927..add1190 100644 (file)
@@ -1,3 +1,8 @@
+2003-07-20  David Shaw  <dshaw@jabberwocky.com>
+
+       * keyedit.c (show_key_with_all_names): Use list-option
+       show-validity in --edit-key interface as well.
+
 2003-07-19  David Shaw  <dshaw@jabberwocky.com>
 
        * options.h, g10.c (main), mainproc.c (check_sig_and_print): Add
index 9c6e8f0..68f71d6 100644 (file)
@@ -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 )