diff options
author | Werner Koch <wk@gnupg.org> | 2016-06-06 16:00:50 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2016-06-06 16:03:22 +0200 |
commit | b047388d57443f584f1c1d6333aac5218b685042 (patch) | |
tree | bf2248ac8941150098e9b1b3bf5a78f636842be3 /g10/pkclist.c | |
parent | indent: Wrap strings in debug messages. (diff) | |
download | gnupg2-b047388d57443f584f1c1d6333aac5218b685042.tar.xz gnupg2-b047388d57443f584f1c1d6333aac5218b685042.zip |
gpg: Implement --keyid-format=none.
* g10/gpg.c (main): Add option "none" to --keyid-format.
* g10/options.h (KF_NONE): New.
* g10/keyid.c (format_keyid): Implement that.
(keystr): Use format "long" is KF_NONE is in use.
(keystr_with_sub): Ditto.
* g10/keylist.c (list_keyblock_print): Adjust indentaion for KF_NONE.
Factor some code out to ...
(print_key_line): new.
(print_fingerprint): Add mode 20.
* g10/mainproc.c (list_node): Use print_key_line. Replace MAINKEY by
flags.primary in the PK. Fix putting a " revoked..." string into the
colons format.
* g10/pkclist.c (do_edit_ownertrust): Use print_key_line. This
slightly changes the putput format.
* g10/revoke.c (gen_standard_revoke): Use print_key_line. This may
also put "expires: " into the output.
--
Due to user experience problems with the keyid and we better allow to
show the fingerprint instead. Note that we do not support v3 keys
anymore and thus there is no technical need for a user to know the
keyid.
GnuPG-bug-id: 2379
Signed-off-by: Werner Koch <wk@gnupg.org>
Diffstat (limited to 'g10/pkclist.c')
-rw-r--r-- | g10/pkclist.c | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/g10/pkclist.c b/g10/pkclist.c index f28410731..8efa95432 100644 --- a/g10/pkclist.c +++ b/g10/pkclist.c @@ -189,7 +189,6 @@ do_edit_ownertrust (ctrl_t ctrl, PKT_public_key *pk, int mode, int min_num; int did_help=defer_help; unsigned int minimum = tdb_get_min_ownertrust (pk); - char pkstrbuf[PUBKEY_STRING_SIZE]; switch(minimum) { @@ -222,13 +221,12 @@ do_edit_ownertrust (ctrl_t ctrl, PKT_public_key *pk, int mode, { KBNODE keyblock, un; - tty_printf(_("No trust value assigned to:\n")); - tty_printf("%s/%s %s\n", - pubkey_string (pk, pkstrbuf, sizeof pkstrbuf), - keystr(keyid), datestr_from_pk( pk ) ); - p=get_user_id_native(keyid); - tty_printf(_(" \"%s\"\n"),p); - xfree(p); + tty_printf (_("No trust value assigned to:\n")); + print_key_line (NULL, pk, 0); + + p = get_user_id_native(keyid); + tty_printf (_(" \"%s\"\n"),p); + xfree (p); keyblock = get_pubkeyblock (keyid); if (!keyblock) |