* options.h, g10.c (main), keylist.c (list_keyblock_print), keyedit.c
authorDavid Shaw <dshaw@jabberwocky.com>
Sun, 3 Aug 2003 02:37:48 +0000 (02:37 +0000)
committerDavid Shaw <dshaw@jabberwocky.com>
Sun, 3 Aug 2003 02:37:48 +0000 (02:37 +0000)
(print_and_check_one_sig): New "show-sig-expire" list-option to show
signature expiration dates (if any).

g10/ChangeLog
g10/g10.c
g10/keyedit.c
g10/keylist.c
g10/options.h

index fd35c3a..6424944 100644 (file)
@@ -1,3 +1,9 @@
+2003-08-02  David Shaw  <dshaw@jabberwocky.com>
+
+       * options.h, g10.c (main), keylist.c (list_keyblock_print),
+       keyedit.c (print_and_check_one_sig): New "show-sig-expire"
+       list-option to show signature expiration dates (if any).
+
 2003-07-24  David Shaw  <dshaw@jabberwocky.com>
 
        * options.h, g10.c (main, add_keyserver_url): Add
index 8c4d36a..77936f5 100644 (file)
--- a/g10/g10.c
+++ b/g10/g10.c
@@ -1764,6 +1764,7 @@ main( int argc, char **argv )
                  {"show-keyring",LIST_SHOW_KEYRING},
                  {"show-validity",LIST_SHOW_VALIDITY},
                  {"show-long-keyid",LIST_SHOW_LONG_KEYID},
+                 {"show-sig-expire",LIST_SHOW_SIG_EXPIRE},
                  {NULL,0}
                };
 
index 68f71d6..42ece54 100644 (file)
@@ -133,7 +133,7 @@ print_and_check_one_sig( KBNODE keyblock, KBNODE node,
        break;
     }
     if( sigrc != '?' || print_without_key ) {
-        tty_printf("%s%c%c %c%c%c%c%c%c %08lX %s   ",
+        tty_printf("%s%c%c %c%c%c%c%c%c %08lX %s",
                   is_rev? "rev":"sig",sigrc,
                   (sig->sig_class-0x10>0 &&
                    sig->sig_class-0x10<4)?'0'+sig->sig_class-0x10:' ',
@@ -145,6 +145,9 @@ print_and_check_one_sig( KBNODE keyblock, KBNODE node,
                   (sig->trust_depth>9)?'T':
                   (sig->trust_depth>0)?'0'+sig->trust_depth:' ',
                   (ulong)sig->keyid[1], datestr_from_sig(sig));
+       if(opt.list_options&LIST_SHOW_SIG_EXPIRE)
+         tty_printf(" %s",expirestr_from_sig(sig));
+       tty_printf("  ");
        if( sigrc == '%' )
            tty_printf("[%s] ", g10_errstr(rc) );
        else if( sigrc == '?' )
index 12cf4e5..e01d8d9 100644 (file)
@@ -823,7 +823,10 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
              printf("%08lX%08lX",(ulong)sig->keyid[0],(ulong)sig->keyid[1]);
            else
              printf("%08lX",(ulong)sig->keyid[1]);
-           printf(" %s   ", datestr_from_sig(sig));
+           printf(" %s", datestr_from_sig(sig));
+           if(opt.list_options&LIST_SHOW_SIG_EXPIRE)
+             printf(" %s", expirestr_from_sig(sig));
+           printf("  ");
            if( sigrc == '%' )
                printf("[%s] ", g10_errstr(rc) );
            else if( sigrc == '?' )
index d9ea865..e243371 100644 (file)
@@ -234,6 +234,7 @@ struct {
 #define LIST_SHOW_KEYRING     8
 #define LIST_SHOW_VALIDITY   16
 #define LIST_SHOW_LONG_KEYID 32
+#define LIST_SHOW_SIG_EXPIRE 64
 
 #define VERIFY_SHOW_PHOTOS      1
 #define VERIFY_SHOW_POLICY      2