diff options
author | Werner Koch <wk@gnupg.org> | 2023-04-18 12:04:15 +0200 |
---|---|---|
committer | Werner Koch <wk@gnupg.org> | 2023-04-18 12:04:15 +0200 |
commit | f7e00dc73dd0a71e21a30e2b4393a6865ef05718 (patch) | |
tree | 56bca04727422e102ee0ba35a0c1561b85650a21 /scd/command.c | |
parent | ssh: Allow to prefer on-disk keys over active card keys. (diff) | |
download | gnupg2-f7e00dc73dd0a71e21a30e2b4393a6865ef05718.tar.xz gnupg2-f7e00dc73dd0a71e21a30e2b4393a6865ef05718.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | scd/command.c | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/scd/command.c b/scd/command.c index 0f0c6c9df..635bb350e 100644 --- a/scd/command.c +++ b/scd/command.c @@ -2195,6 +2195,7 @@ cmd_apdu (assuan_context_t ctx, char *line) unsigned char *result = NULL; size_t resultlen; + card->maybe_check_aid = 1; rc = apdu_send_direct (card->slot, exlen, apdu, apdulen, handle_more, NULL, &result, &resultlen); |