mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Mark disabled keys and add show-ownertrust list option.
* g10/options.h (LIST_SHOW_OWNERTRUST): New. * g10/keylist.c (print_key_line): Show wonertrust and always show whether a key is disabled. * g10/gpg.c (parse_list_options): Add "show-ownertrust". * g10/gpgv.c (get_ownertrust_string): Add stub. * g10/test-stubs.c (get_ownertrust_string): Add stub. -- Note that in a --with-colons listing the ownertrust has always been emitted and the disabled state is marked in that listing with a special 'D' usage.
This commit is contained in:
parent
21f7ad563d
commit
7d6ad28667
6 changed files with 33 additions and 10 deletions
|
@ -2600,6 +2600,11 @@ print_key_line (ctrl_t ctrl, estream_t fp, PKT_public_key *pk, int secret)
|
|||
tty_fprintf (fp, " [%s]", usagestr_from_pk (pk, 0));
|
||||
}
|
||||
|
||||
if (pk->flags.primary && (opt.list_options & LIST_SHOW_OWNERTRUST))
|
||||
{
|
||||
tty_fprintf (fp, " [%s]", get_ownertrust_string (ctrl, pk, 0));
|
||||
}
|
||||
|
||||
if (pk->flags.revoked)
|
||||
{
|
||||
tty_fprintf (fp, " [");
|
||||
|
@ -2619,21 +2624,14 @@ print_key_line (ctrl_t ctrl, estream_t fp, PKT_public_key *pk, int secret)
|
|||
tty_fprintf (fp, "]");
|
||||
}
|
||||
|
||||
#if 0
|
||||
/* I need to think about this some more. It's easy enough to
|
||||
include, but it looks sort of confusing in the listing... */
|
||||
if (opt.list_options & LIST_SHOW_VALIDITY)
|
||||
{
|
||||
int validity = get_validity (ctrl, pk, NULL, NULL, 0);
|
||||
tty_fprintf (fp, " [%s]", trust_value_to_string (validity));
|
||||
}
|
||||
#endif
|
||||
|
||||
if (pk->pubkey_algo >= 100)
|
||||
tty_fprintf (fp, " [experimental algorithm %d]", pk->pubkey_algo);
|
||||
|
||||
tty_fprintf (fp, "\n");
|
||||
|
||||
if (pk->flags.primary && pk_is_disabled (pk))
|
||||
es_fprintf (es_stdout, " *** %s\n", _("This key has been disabled"));
|
||||
|
||||
/* if the user hasn't explicitly asked for human-readable
|
||||
fingerprints, show compact fpr of primary key: */
|
||||
if (pk->flags.primary &&
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue