From 1abfce82bd525de2976c31b83bb0e67e33364e58 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Wed, 12 Feb 2020 12:50:38 +0100 Subject: 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 --- tools/card-keys.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tools/card-keys.c') 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; } -- cgit v1.2.3