diff options
author | NIIBE Yutaka <[email protected]> | 2020-09-08 02:41:33 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-10-06 08:15:49 +0000 |
commit | 25bec16d0bdcb9829a7b35c403cbb778b3b0c097 (patch) | |
tree | 60c56f260069c380b357dbf7f61bd59073d39664 | |
parent | scd: Silence compiler warning. (diff) | |
download | gnupg-25bec16d0bdcb9829a7b35c403cbb778b3b0c097.tar.gz gnupg-25bec16d0bdcb9829a7b35c403cbb778b3b0c097.zip |
scd: Add a workaround for Yubikey.
* scd/app-openpgp.c (get_public_key): Handle wrong code for Yubikey.
--
Backport master commit of:
0db9c83555b4a8a0c52f96e96ec20dbfd3d75272
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 <[email protected]>
-rw-r--r-- | scd/app-openpgp.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index b0ecb9243..e8a81f587 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1756,6 +1756,12 @@ get_public_key (app_t app, int keyno) 2, le_value, &buffer, &buflen); if (err) { + /* Yubikey returns wrong code. Fix it up. */ + /* + * NOTE: It's not correct to blindly change the error code, + * however, for our experiences, it is only Yubikey... + */ + err = gpg_error (GPG_ERR_NO_OBJ); log_error (_("reading public key failed: %s\n"), gpg_strerror (err)); goto leave; } |