mirror of
git://git.gnupg.org/gnupg.git
synced 2024-11-11 21:48:50 +01:00
* options.h, g10.c (main), keylist.c (list_keyblock_print): Add
"show-unusable-subkeys" list-option to show revoked and/or expired subkeys.
This commit is contained in:
parent
7198879ca8
commit
aa5f1940ff
@ -1,3 +1,9 @@
|
|||||||
|
2004-02-11 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
|
* options.h, g10.c (main), keylist.c (list_keyblock_print): Add
|
||||||
|
"show-unusable-subkeys" list-option to show revoked and/or expired
|
||||||
|
subkeys.
|
||||||
|
|
||||||
2004-02-10 David Shaw <dshaw@jabberwocky.com>
|
2004-02-10 David Shaw <dshaw@jabberwocky.com>
|
||||||
|
|
||||||
* keyedit.c (keyedit_menu): Prompt for subkey removal for both
|
* keyedit.c (keyedit_menu): Prompt for subkey removal for both
|
||||||
|
@ -1705,6 +1705,7 @@ main( int argc, char **argv )
|
|||||||
g10_opt_verbose++;
|
g10_opt_verbose++;
|
||||||
opt.verbose++;
|
opt.verbose++;
|
||||||
opt.list_options|=LIST_SHOW_UNUSABLE_UIDS;
|
opt.list_options|=LIST_SHOW_UNUSABLE_UIDS;
|
||||||
|
opt.list_options|=LIST_SHOW_UNUSABLE_SUBKEYS;
|
||||||
break;
|
break;
|
||||||
case oKOption: set_cmd( &cmd, aKMode ); break;
|
case oKOption: set_cmd( &cmd, aKMode ); break;
|
||||||
|
|
||||||
@ -2102,6 +2103,7 @@ main( int argc, char **argv )
|
|||||||
{"show-validity",LIST_SHOW_VALIDITY},
|
{"show-validity",LIST_SHOW_VALIDITY},
|
||||||
{"show-long-keyids",LIST_SHOW_LONG_KEYIDS},
|
{"show-long-keyids",LIST_SHOW_LONG_KEYIDS},
|
||||||
{"show-unusable-uids",LIST_SHOW_UNUSABLE_UIDS},
|
{"show-unusable-uids",LIST_SHOW_UNUSABLE_UIDS},
|
||||||
|
{"show-unusable-subkeys",LIST_SHOW_UNUSABLE_SUBKEYS},
|
||||||
{"show-keyring",LIST_SHOW_KEYRING},
|
{"show-keyring",LIST_SHOW_KEYRING},
|
||||||
{"show-sig-expire",LIST_SHOW_SIG_EXPIRE},
|
{"show-sig-expire",LIST_SHOW_SIG_EXPIRE},
|
||||||
{NULL,0}
|
{NULL,0}
|
||||||
|
@ -605,7 +605,9 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||||||
struct sig_stats *stats=opaque;
|
struct sig_stats *stats=opaque;
|
||||||
int skip_sigs=0;
|
int skip_sigs=0;
|
||||||
int newformat=((opt.list_options&LIST_SHOW_VALIDITY) && !secret)
|
int newformat=((opt.list_options&LIST_SHOW_VALIDITY) && !secret)
|
||||||
|| (opt.list_options & (LIST_SHOW_LONG_KEYIDS|LIST_SHOW_UNUSABLE_UIDS));
|
|| (opt.list_options & (LIST_SHOW_LONG_KEYIDS
|
||||||
|
| LIST_SHOW_UNUSABLE_UIDS
|
||||||
|
| LIST_SHOW_UNUSABLE_SUBKEYS));
|
||||||
|
|
||||||
/* get the keyid from the keyblock */
|
/* get the keyid from the keyblock */
|
||||||
node = find_kbnode( keyblock, secret? PKT_SECRET_KEY : PKT_PUBLIC_KEY );
|
node = find_kbnode( keyblock, secret? PKT_SECRET_KEY : PKT_PUBLIC_KEY );
|
||||||
@ -742,6 +744,15 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||||||
u32 keyid2[2];
|
u32 keyid2[2];
|
||||||
PKT_public_key *pk2 = node->pkt->pkt.public_key;
|
PKT_public_key *pk2 = node->pkt->pkt.public_key;
|
||||||
|
|
||||||
|
if((pk2->is_revoked || pk2->has_expired)
|
||||||
|
&& !(opt.list_options&LIST_SHOW_UNUSABLE_SUBKEYS))
|
||||||
|
{
|
||||||
|
skip_sigs=1;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
skip_sigs=0;
|
||||||
|
|
||||||
if( !any ) {
|
if( !any ) {
|
||||||
putchar('\n');
|
putchar('\n');
|
||||||
if( fpr )
|
if( fpr )
|
||||||
@ -817,7 +828,6 @@ list_keyblock_print ( KBNODE keyblock, int secret, int fpr, void *opaque )
|
|||||||
/* TODO: Make sure a cached sig record here still has
|
/* TODO: Make sure a cached sig record here still has
|
||||||
the pk that issued it. See also
|
the pk that issued it. See also
|
||||||
keyedit.c:print_and_check_one_sig */
|
keyedit.c:print_and_check_one_sig */
|
||||||
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
rc = 0;
|
rc = 0;
|
||||||
|
@ -245,8 +245,9 @@ struct {
|
|||||||
#define LIST_SHOW_VALIDITY (1<<4)
|
#define LIST_SHOW_VALIDITY (1<<4)
|
||||||
#define LIST_SHOW_LONG_KEYIDS (1<<5)
|
#define LIST_SHOW_LONG_KEYIDS (1<<5)
|
||||||
#define LIST_SHOW_UNUSABLE_UIDS (1<<6)
|
#define LIST_SHOW_UNUSABLE_UIDS (1<<6)
|
||||||
#define LIST_SHOW_KEYRING (1<<7)
|
#define LIST_SHOW_UNUSABLE_SUBKEYS (1<<7)
|
||||||
#define LIST_SHOW_SIG_EXPIRE (1<<8)
|
#define LIST_SHOW_KEYRING (1<<8)
|
||||||
|
#define LIST_SHOW_SIG_EXPIRE (1<<9)
|
||||||
|
|
||||||
#define VERIFY_SHOW_PHOTOS (1<<0)
|
#define VERIFY_SHOW_PHOTOS (1<<0)
|
||||||
#define VERIFY_SHOW_POLICY_URLS (1<<1)
|
#define VERIFY_SHOW_POLICY_URLS (1<<1)
|
||||||
|
Loading…
Reference in New Issue
Block a user