aboutsummaryrefslogtreecommitdiffstats
path: root/scd/app-common.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-01-29 12:28:10 +0000
committerWerner Koch <[email protected]>2019-01-29 12:46:52 +0000
commit79bed504e51034d960fcb858fb643901cad85913 (patch)
tree681c06acc035906240fee574d7d590797817d9e7 /scd/app-common.h
parentcard: Print keyinfo for PIV cards. (diff)
downloadgnupg-79bed504e51034d960fcb858fb643901cad85913.tar.gz
gnupg-79bed504e51034d960fcb858fb643901cad85913.zip
card: Support factory reset for Yubikey PIV application.
* scd/app-common.h (struct app_ctx_s): Add field cardtype. * scd/app.c (app_new_register): Set cardtype for yubikey. (app_getattr): Add CARDTYPE. (app_write_learn_status): Emit new attribute. * scd/app-piv.c (do_getattr): Add CHV-USAGE. (do_learn_status): Emit it. * tools/card-tool.h (struct card_info_s): Add field cardtype. * tools/card-call-scd.c (learn_status_cb): Parse "CARDTYPE". * tools/gpg-card-tool.c (list_piv): Print PIN usage policy. (list_card): Print card type. (cmd_factoryreset): Implement for Yubikey with PIV. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'scd/app-common.h')
-rw-r--r--scd/app-common.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/scd/app-common.h b/scd/app-common.h
index b1661b524..98d8464dc 100644
--- a/scd/app-common.h
+++ b/scd/app-common.h
@@ -52,6 +52,7 @@ struct app_ctx_s {
unsigned char *serialno; /* Serialnumber in raw form, allocated. */
size_t serialnolen; /* Length in octets of serialnumber. */
+ const char *cardtype; /* NULL or string with the token's type. */
const char *apptype;
unsigned int card_version;
unsigned int card_status;