diff options
author | Werner Koch <wk@gnupg.org> | 2021-02-02 12:39:13 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2021-02-02 12:40:07 +0100 |
commit | a06c79b6143fc49e6f5169b8a9f53c691031d6ca (patch) | |
tree | b172b76806dc5aa720126fbd62e3007cc7d89aec /tools | |
parent | scd:p15: Read PuKDF and minor refactoring. (diff) | |
download | gnupg2-a06c79b6143fc49e6f5169b8a9f53c691031d6ca.tar.xz gnupg2-a06c79b6143fc49e6f5169b8a9f53c691031d6ca.zip |
card: List keys of pkcs#15 cards.
* tools/gpg-card.c (list_p15): New.
(list_card): Call it.
Diffstat (limited to 'tools')
-rw-r--r-- | tools/gpg-card.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c index f4e33fa64..07e7ce4c8 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -1010,6 +1010,24 @@ list_nks (card_info_t info, estream_t fp, int no_key_lookup) } +/* List PKCS#15 card specific data. */ +static void +list_p15 (card_info_t info, estream_t fp, int no_key_lookup) +{ + static struct keyinfolabel_s keyinfolabels[] = { + { NULL, NULL } + }; + int i; + + tty_fprintf (fp, "PIN retry counter :"); + for (i=0; i < DIM (info->chvinfo); i++) + { + tty_fprintf (fp, " %d", info->chvinfo[i]); + } + tty_fprintf (fp, "\n"); + list_all_kinfo (info, keyinfolabels, fp, no_key_lookup); +} + static void print_a_version (estream_t fp, const char *prefix, unsigned int value) @@ -1072,6 +1090,7 @@ list_card (card_info_t info, int no_key_lookup) case APP_TYPE_OPENPGP: list_openpgp (info, fp, no_key_lookup); break; case APP_TYPE_PIV: list_piv (info, fp, no_key_lookup); break; case APP_TYPE_NKS: list_nks (info, fp, no_key_lookup); break; + case APP_TYPE_P15: list_p15 (info, fp, no_key_lookup); break; default: break; } } |