From f3198f9d705afe3cd26f4ee7ca42633e62fadc6a Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 25 Oct 2022 11:01:41 +0200 Subject: [PATCH] card: Also show fingerprints of known X.509 certificates * tools/gpg-card.c (list_one_kinfo): Show fpr. -- The fingerprint is actually more useful than the Subject-DN. --- tools/gpg-card.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/gpg-card.c b/tools/gpg-card.c index d851f99fc..aed71f57e 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -789,7 +789,10 @@ list_one_kinfo (card_info_t info, key_info_t kinfo, } else /* Print the primary key as fallback. */ print_shax_fpr (fp, pubkey->fpr, pubkey->fprlen); - + } + if (kb->protocol == GNUPG_PROTOCOL_OPENPGP + || kb->protocol == GNUPG_PROTOCOL_CMS) + { /* Find the primary or subkey of that key. */ for (; pubkey; pubkey = pubkey->next) if (pubkey->grip_valid