1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

gpg: Add list-option "show-usage".

* g10/gpg.c (parse_list_options): Add "show-usage".
* g10/options.h (LIST_SHOW_USAGE): New.
* g10/keyid.c (usagestr_from_pk): Add arg FILL.  Change caller.
* g10/keylist.c (list_keyblock_print): Print usage info.
This commit is contained in:
Werner Koch 2014-08-12 10:36:30 +02:00
parent cb127024b9
commit 7d0492075e
7 changed files with 22 additions and 4 deletions

View file

@ -834,6 +834,10 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque)
pubkey_string (pk, pkstrbuf, sizeof pkstrbuf),
keystr_from_pk (pk), datestr_from_pk (pk));
if ((opt.list_options & LIST_SHOW_USAGE))
{
es_fprintf (es_stdout, " [%s]", usagestr_from_pk (pk, 0));
}
if (pk->flags.revoked)
{
es_fprintf (es_stdout, " [");
@ -973,6 +977,10 @@ list_keyblock_print (KBNODE keyblock, int secret, int fpr, void *opaque)
xfree (curve);
}
if ((opt.list_options & LIST_SHOW_USAGE))
{
es_fprintf (es_stdout, " [%s]", usagestr_from_pk (pk2, 0));
}
if (pk2->flags.revoked)
{
es_fprintf (es_stdout, " [");