diff options
author | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-07 02:02:17 +0100 |
---|---|---|
committer | NIIBE Yutaka <gniibe@fsij.org> | 2020-12-07 02:02:17 +0100 |
commit | 1cd615afe3010d2c3919de489d7c9a78513c8694 (patch) | |
tree | 6ba02414a7c5c586f0e2006407b28f6de8042e8b /g10/call-agent.c | |
parent | scd:nks: Fix caching keygrip (more). (diff) | |
download | gnupg2-1cd615afe3010d2c3919de489d7c9a78513c8694.tar.xz gnupg2-1cd615afe3010d2c3919de489d7c9a78513c8694.zip |
gpg,card: Allow no version information of Yubikey.
* g10/call-agent.c (learn_status_cb): Assume >= 2 when no version.
* tools/card-call-scd.c (learn_status_cb): Likewise.
--
GnuPG-bug-id: 5100
Signed-off-by: NIIBE Yutaka <gniibe@fsij.org>
Diffstat (limited to 'g10/call-agent.c')
-rw-r--r-- | g10/call-agent.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/g10/call-agent.c b/g10/call-agent.c index 9a3b43d9e..a553ef67a 100644 --- a/g10/call-agent.c +++ b/g10/call-agent.c @@ -531,7 +531,8 @@ learn_status_cb (void *opaque, const char *line) xfree (parm->serialno); parm->serialno = store_serialno (line); parm->is_v2 = (strlen (parm->serialno) >= 16 - && xtoi_2 (parm->serialno+12) >= 2 ); + && (xtoi_2 (parm->serialno+12) == 0 /* Yubikey */ + || xtoi_2 (parm->serialno+12) >= 2)); } else if (keywordlen == 7 && !memcmp (keyword, "APPTYPE", keywordlen)) { |