diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2022-05-06 11:15:31 +0200 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2022-05-06 11:27:11 +0200 |
commit | 054d14887ef8fa1cbadef4ed2ea28213f25f5d25 (patch) | |
tree | 2781a3c6040fcbdbf93d783f77623ee36ce7aada /scd | |
parent | scd:p15: Fix reading certificates without length info. (diff) | |
download | gnupg2-054d14887ef8fa1cbadef4ed2ea28213f25f5d25.tar.xz gnupg2-054d14887ef8fa1cbadef4ed2ea28213f25f5d25.zip |
scd: Add workaround for ECC attribute on Yubikey.
* scd/app-openpgp.c (parse_algorithm_attribute): Skip possibly bogus
octet in a key attribute.
--
GnuPG-bug-id: 5963
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'scd')
-rw-r--r-- | scd/app-openpgp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/scd/app-openpgp.c b/scd/app-openpgp.c index d4439e7c3..7dc98aa75 100644 --- a/scd/app-openpgp.c +++ b/scd/app-openpgp.c @@ -6226,7 +6226,8 @@ parse_algorithm_attribute (app_t app, int keyno) app->app_local->keyattr[keyno].ecc.algo = *buffer; app->app_local->keyattr[keyno].ecc.flags = 0; - if (buffer[buflen-1] == 0x00 || buffer[buflen-1] == 0xff) + if (APP_CARD(app)->cardtype == CARDTYPE_YUBIKEY + || buffer[buflen-1] == 0x00 || buffer[buflen-1] == 0xff) { /* Found "pubkey required"-byte for private key template. */ oidlen--; if (buffer[buflen-1] == 0xff) |