summaryrefslogtreecommitdiffstats
path: root/tools/gpg-card.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2019-03-05 17:40:08 +0100
committerWerner Koch <wk@gnupg.org>2019-03-05 17:40:08 +0100
commit8d4af54ddd039d47e9c4803559193fcca97f0a46 (patch)
tree574703e89a3e6f899765c4660d0f353c1bec52c9 /tools/gpg-card.h
parentscd: Rename a shared info field name. (diff)
downloadgnupg2-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.h2
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. */