diff options
author | Werner Koch <wk@gnupg.org> | 2019-03-05 17:40:08 +0100 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2019-03-05 17:40:08 +0100 |
commit | 8d4af54ddd039d47e9c4803559193fcca97f0a46 (patch) | |
tree | 574703e89a3e6f899765c4660d0f353c1bec52c9 /tools/gpg-card.h | |
parent | scd: Rename a shared info field name. (diff) | |
download | gnupg2-8d4af54ddd039d47e9c4803559193fcca97f0a46.tar.xz gnupg2-8d4af54ddd039d47e9c4803559193fcca97f0a46.zip |
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>
Diffstat (limited to 'tools/gpg-card.h')
-rw-r--r-- | tools/gpg-card.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gpg-card.h b/tools/gpg-card.h index 3a86a67ec..099ea5448 100644 --- a/tools/gpg-card.h +++ b/tools/gpg-card.h @@ -142,8 +142,10 @@ struct card_info_s int error; /* private. */ char *reader; /* Reader information. */ char *cardtype; /* NULL or type of the card. */ + unsigned int cardversion; /* Firmware version of the card. */ char *apptypestr; /* Malloced application type string. */ app_type_t apptype;/* Translated from APPTYPESTR. */ + unsigned int appversion; /* Version of the application. */ char *serialno; /* malloced hex string. */ char *dispserialno;/* malloced string. */ char *disp_name; /* malloced. */ |