diff options
| author | Werner Koch <[email protected]> | 2021-03-18 10:29:31 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2021-03-18 10:29:31 +0000 |
| commit | 1ac189f2df6cedab3a133baca69558fdf6a908d4 (patch) | |
| tree | a067a451a96cf3f61939243900ed5a1bb17a470d /tools/gpg-card.c | |
| parent | scd:p15: New attribute CHV-LABEL. (diff) | |
| download | gnupg-1ac189f2df6cedab3a133baca69558fdf6a908d4.tar.gz gnupg-1ac189f2df6cedab3a133baca69558fdf6a908d4.zip | |
card: Print PIN descriptions and fix number of printed retry counters.
* tools/gpg-card.h (struct card_info_s): Add fields nmaxlen, nchvinfo,
and chvlabels.
* tools/card-call-scd.c (release_card_info): Free chvlabels.
(learn_status_cb): Parse CHV-LABEL. Set nmaxlen and nchvinfo.
* tools/gpg-card.c (list_retry_counter): Print CHV labels.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'tools/gpg-card.c')
| -rw-r--r-- | tools/gpg-card.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/tools/gpg-card.c b/tools/gpg-card.c index be6929c3a..9257bc78f 100644 --- a/tools/gpg-card.c +++ b/tools/gpg-card.c @@ -836,8 +836,10 @@ list_retry_counter (card_info_t info, estream_t fp) const char *s; int i; + if (info->chvlabels) + tty_fprintf (fp, "PIN labels .......: %s\n", info->chvlabels); tty_fprintf (fp, "PIN retry counter :"); - for (i=0; i < DIM (info->chvinfo); i++) + for (i=0; i < DIM (info->chvinfo) && i < info->nchvinfo; i++) { if (info->chvinfo[i] >= 0) tty_fprintf (fp, " %d", info->chvinfo[i]); |
