scd:openpgp: Avoid PIN caching issues after re-select.

* scd/app-openpgp.c (do_reselect): Clear PIN cache flags.
--

It seems that the verification status of the OpenPGP app on a Yubikey
is reset on a select.  We need to reflect this in our cache to avoid a
"Bad PIN" error on computing a signature.

Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
Werner Koch 2019-09-05 13:53:58 +02:00
parent 61ed02211a
commit 5d9eb060b7
No known key found for this signature in database
GPG Key ID: E3FDFF218E45B72B
1 changed files with 6 additions and 0 deletions

View File

@ -5228,6 +5228,12 @@ do_reselect (app_t app, ctrl_t ctrl)
* a special flag value. */
err = iso7816_select_application (app_get_slot (app),
openpgp_aid, sizeof openpgp_aid, 0x0001);
if (!err)
{
app->did_chv1 = 0;
app->did_chv2 = 0;
app->did_chv3 = 0;
}
return err;
}