Diffusion GnuPG 79bed504e510

card: Support factory reset for Yubikey PIV application.

Authored by werner on Tue, Jan 29, 1:28 PM.

Description

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 <wk@gnupg.org>

Details

Committed
wernerTue, Jan 29, 1:46 PM
Parents
rG9325c92284bb: card: Print keyinfo for PIV cards.
Branches
Unknown
Tags
Unknown