* keyedit.c (show_key_with_all_names): Fix assertion failure when using
authorDavid Shaw <dshaw@jabberwocky.com>
Wed, 3 Sep 2003 23:24:03 +0000 (23:24 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Wed, 3 Sep 2003 23:24:03 +0000 (23:24 +0000)
toggle to see a secret key.  Reported by Maxim Britov.

g10/ChangeLog
g10/keyedit.c

index 7b78ae9..19bb821 100644 (file)
@@ -1,3 +1,8 @@
+2003-09-03  David Shaw  <dshaw@jabberwocky.com>
+
+       * keyedit.c (show_key_with_all_names): Fix assertion failure when
+       using toggle to see a secret key.  Reported by Maxim Britov.
+
 2003-08-31  David Shaw  <dshaw@jabberwocky.com>
 
        * g10.c (add_keyserver_url), keyedit.c (keyedit_menu), sign.c
index 043cdba..d9506d7 100644 (file)
@@ -2129,8 +2129,6 @@ show_key_with_all_names( KBNODE keyblock, int only_marked, int with_revoker,
        }
     }
     
-    assert(primary);
-
     /* the user ids */
     i = 0;
     for( node = keyblock; node; node = node->next ) {
@@ -2138,7 +2136,7 @@ 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)
+                if(opt.list_options&LIST_SHOW_VALIDITY && primary)
                  tty_printf("[%8.8s] ",
                             trust_value_to_string(get_validity(primary,uid)));
                if( only_marked )