1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-03 22:56:33 +02:00

scd: On a Yubikey re-select the last app after the use of APDU.

* scd/app-common.h (struct card_ctx_s): Add maybe_check_aid flag.
* scd/command.c (cmd_apdu): Set it.
* scd/app.c (check_external_interference): Consult this flag.
(maybe_switch_app): Do a re-select if this flag is set.
--

After the gpg-card tool has issued a Yubikey specific command the
current application is not anymore correctly selected.  This then
results in all kind of errors.  We detect this now and try to
re-select the last app.
This commit is contained in:
Werner Koch 2023-04-18 12:04:15 +02:00
parent 98b8c518fa
commit f7e00dc73d
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
3 changed files with 22 additions and 2 deletions

View file

@ -119,6 +119,7 @@ struct card_ctx_s {
/* Various flags. */
unsigned int reset_requested:1;
unsigned int periodical_check_needed:1;
unsigned int maybe_check_aid:1;
};