diff options
author | NIIBE Yutaka <[email protected]> | 2015-09-29 04:45:20 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2015-09-29 04:45:20 +0000 |
commit | fea9d4354c93b662c75febe020fb799ce4f2ec89 (patch) | |
tree | e888aac585bec8365455a2ac09229c2c243a9793 | |
parent | ssh: Fix fingerprint computation for 384 bit ECDSA keys. (diff) | |
download | gnupg-fea9d4354c93b662c75febe020fb799ce4f2ec89.tar.gz gnupg-fea9d4354c93b662c75febe020fb799ce4f2ec89.zip |
gpg: Improve 'General key info' line of --card-status.
* g10/keylist.c (print_pubkey_info): Print either "pub" or "sub".
--
This now prints "sub" if the first used card key is actually a subkey.
Signed-off-by: Werner Koch <[email protected]>
GnuPG-bug-id: 2079
(backported from master 874ef16e70ab750db7b153f17a7e859a0db6a2f1)
-rw-r--r-- | g10/keylist.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/keylist.c b/g10/keylist.c index 457695b68..8db214718 100644 --- a/g10/keylist.c +++ b/g10/keylist.c @@ -164,12 +164,14 @@ print_pubkey_info (FILE *fp, PKT_public_key *pk) p=get_user_id_native(keyid); if (fp) - fprintf (fp, "pub %4u%c/%s %s %s\n", + fprintf (fp, "%s %4u%c/%s %s %s\n", + pk->is_primary? "pub":"sub", nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo), keystr(keyid), datestr_from_pk (pk), p); else - tty_printf ("\npub %4u%c/%s %s %s\n", + tty_printf ("\n%s %4u%c/%s %s %s\n", + pk->is_primary? "pub":"sub", nbits_from_pk (pk), pubkey_letter (pk->pubkey_algo), keystr(keyid), datestr_from_pk (pk), p); |