diff options
author | Werner Koch <[email protected]> | 2020-02-12 11:50:38 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-02-12 11:50:38 +0000 |
commit | 1abfce82bd525de2976c31b83bb0e67e33364e58 (patch) | |
tree | 9632addec0e3a4a3e80f0a466f9e28484ec2f4a8 /tools/card-keys.c | |
parent | card: New option --no-key-lookup. (diff) | |
download | gnupg-1abfce82bd525de2976c31b83bb0e67e33364e58.tar.gz gnupg-1abfce82bd525de2976c31b83bb0e67e33364e58.zip |
card: List more info for an OpenPGP key.
* tools/gpg-card.h (struct pubkey_s): Add field created.
* tools/card-keys.c (parse_key_record): Set that field.
* tools/gpg-card.c (print_shax_fpr): Print the fingerprint without
spaces for easier c+p.
(list_one_kinfo): Print the actual used fingerprint and creation date
from the keyblock.
--
A common problem with OpenPGP cards is that the fingerprint as stored
on the card does not match the actual fingerprint. Print both values
to be able to investigate such issues.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/card-keys.c')
-rw-r--r-- | tools/card-keys.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tools/card-keys.c b/tools/card-keys.c index ad06f2ff7..4706cb320 100644 --- a/tools/card-keys.c +++ b/tools/card-keys.c @@ -174,6 +174,10 @@ parse_key_record (char **fields, int nfields, pubkey_t *r_pubkey) pubkey = xtrycalloc (1, sizeof *pubkey); if (!pubkey) return gpg_error_from_syserror (); + + if (nfields > 5) + pubkey->created = parse_timestamp (fields[5], NULL); + *r_pubkey = pubkey; return 0; } |