diff options
author | NIIBE Yutaka <[email protected]> | 2020-12-08 08:45:18 +0000 |
---|---|---|
committer | NIIBE Yutaka <[email protected]> | 2020-12-08 08:45:18 +0000 |
commit | 946555ea3ceb823b95ed13654ae4fd667daa4337 (patch) | |
tree | 05de9a59cd9e2733fb3add581d0d18e952a1aa65 /scd/app-openpgp.c | |
parent | agent: Allow decryption with card but no file. (diff) | |
download | gnupg-946555ea3ceb823b95ed13654ae4fd667daa4337.tar.gz gnupg-946555ea3ceb823b95ed13654ae4fd667daa4337.zip |
scd:yubikey: Fix support of Yubikey NEO.
* scd/app-openpgp.c (get_public_key): Yubikey NEO also has this issue.
Signed-off-by: NIIBE Yutaka <[email protected]>
Diffstat (limited to 'scd/app-openpgp.c')
-rw-r--r-- | scd/app-openpgp.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index 7a2aebe70..8f6512fa5 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -1920,6 +1920,9 @@ get_public_key (app_t app, int keyno) /* Yubikey returns wrong code. Fix it up. */ if (app->card->cardtype == CARDTYPE_YUBIKEY) err = gpg_error (GPG_ERR_NO_OBJ); + /* Yubikey NEO (!CARDTYPE_YUBIKEY) also returns wrong code. Fix it up. */ + else if (gpg_err_code (err) == GPG_ERR_CARD) + err = gpg_error (GPG_ERR_NO_OBJ); log_error (_("reading public key failed: %s\n"), gpg_strerror (err)); goto leave; } |