card: Print card version. Check for bad Yubikeys.
authorWerner Koch <wk@gnupg.org>
Tue, 5 Mar 2019 16:40:08 +0000 (17:40 +0100)
committerWerner Koch <wk@gnupg.org>
Tue, 5 Mar 2019 16:40:08 +0000 (17:40 +0100)
commit8d4af54ddd039d47e9c4803559193fcca97f0a46
tree574703e89a3e6f899765c4660d0f353c1bec52c9
parent64caa6a08298119b10dc36ddd27b357cb47825b5
card: Print card version.  Check for bad Yubikeys.

* scd/app.c (app_new_register): Set card version for Yubikeys.
(app_write_learn_status): Print CARDVERSION and APPVERSION.
* tools/card-call-scd.c (learn_status_cb): Detect them.
* tools/gpg-card.h (struct card_info_s): Add appversion and
cardversion.
* tools/gpg-card.c (list_openpgp): Remove version printing from serial
number.
(print_a_version): New.
(list_card): Print card and app version.
(cmd_generate): Do not allow broken Yubikeys.

Signed-off-by: Werner Koch <wk@gnupg.org>
scd/app.c
scd/command.c
tools/card-call-scd.c
tools/gpg-card.c
tools/gpg-card.h