diff options
author | David Shaw <[email protected]> | 2004-02-11 04:32:52 +0000 |
---|---|---|
committer | David Shaw <[email protected]> | 2004-02-11 04:32:52 +0000 |
commit | 7198879ca8db7e5281a1503f1ed1636dc2c5c24f (patch) | |
tree | 29665490c870eb0e3b285f3704ef065d29fe982c /g10/keylist.c | |
parent | * keygen.c (keygen_set_std_prefs): Build the default preferences list at (diff) | |
download | gnupg-7198879ca8db7e5281a1503f1ed1636dc2c5c24f.tar.gz gnupg-7198879ca8db7e5281a1503f1ed1636dc2c5c24f.zip |
* keyedit.c (keyedit_menu): Prompt for subkey removal for both secret and
public subkeys.
* keylist.c (list_keyblock_print), keyedit.c (show_key_with_all_names):
Show the revocation date of a key/subkey, and general formatting work.
* packet.h, getkey.c (merge_selfsigs_main, merge_selfsigs_subkey,
merge_selfsigs): Keep track of the revocation date of a key.
* keydb.h, keyid.c (revokestr_from_pk): New function to print the
revocation date of a key.
Diffstat (limited to 'g10/keylist.c')
-rw-r--r-- | g10/keylist.c | 24 |
1 files changed, 14 insertions, 10 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index 3f372f163..c949e8a0c 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -662,8 +662,15 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) /* We didn't include this before in the key listing, but there is room in the new format, so why not? */ - if(newformat && pk->expiredate) - printf(_(" [expires: %s]"), expirestr_from_pk( pk ) ); + if(newformat) + { + if(pk->is_revoked) + printf(_(" [revoked: %s]"), revokestr_from_pk( pk ) ); + else if(pk->has_expired) + printf(_(" [expired: %s]"), expirestr_from_pk( pk ) ); + else if(pk->expiredate) + printf(_(" [expires: %s]"), expirestr_from_pk( pk ) ); + } #if 0 /* I need to think about this some more. It's easy enough to @@ -697,7 +704,7 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) if(uid->is_revoked || uid->is_expired) printf("uid%*s[%s] ", (opt.list_options&LIST_SHOW_LONG_KEYIDS)?16:8,"", - uid->is_revoked?"revoked":"expired"); + uid->is_revoked?_("revoked"):_("expired")); else if((opt.list_options&LIST_SHOW_VALIDITY) && pk) { const char *validity= @@ -750,14 +757,11 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque ) else printf("%08lX",(ulong)keyid2[1]); printf(" %s",datestr_from_pk(pk2)); - /* Yes, this is an odd way to print the revoked string, - but we already have translations for "[revoked] " (with - the trailing space) and this is a simple way to take - advantage of it. In devel, this will be done rather - more elegantly. */ if( pk2->is_revoked ) - printf(" %s",_("[revoked] ")); - else if( pk2->expiredate ) + printf(_(" [revoked: %s]"), revokestr_from_pk(pk2)); + else if( pk2->has_expired ) + printf(_(" [expired: %s]"), expirestr_from_pk( pk2 ) ); + else if( pk2->expiredate ) printf(_(" [expires: %s]"), expirestr_from_pk( pk2 ) ); putchar('\n'); if( fpr > 1 ) |