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

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 <wk@gnupg.org>
This commit is contained in:
Werner Koch 2020-02-12 12:50:38 +01:00
parent 2c6092bc5d
commit 1abfce82bd
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 21 additions and 12 deletions

View file

@ -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;
}