1
0
mirror of git://git.gnupg.org/gnupg.git synced 2024-12-22 10:19:57 +01:00

scd: Add a workaround for Yubikey.

* scd/app-openpgp.c (get_public_key): Handle wrong code for Yubikey.

--

Yubikey version 5 s/n 609074582 returns 0x6982, version 5.2.4 s/n
610616049 returns 0x6581, where 0x6a88 is expected.

Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
This commit is contained in:
NIIBE Yutaka 2020-09-08 11:41:33 +09:00
parent 270c49b8c6
commit 0db9c83555

View File

@ -1943,6 +1943,9 @@ get_public_key (app_t app, int keyno)
2, le_value, &buffer, &buflen);
if (err)
{
/* Yubikey returns wrong code. Fix it up. */
if (app->card->cardtype == CARDTYPE_YUBIKEY)
err = gpg_error (GPG_ERR_NO_OBJ);
log_error (_("reading public key failed: %s\n"), gpg_strerror (err));
goto leave;
}