summaryrefslogtreecommitdiffstats
path: root/g10/call-agent.c
diff options
context:
space:
mode:
authorNIIBE Yutaka <gniibe@fsij.org>2020-12-07 02:02:17 +0100
committerNIIBE Yutaka <gniibe@fsij.org>2020-12-07 02:02:17 +0100
commit1cd615afe3010d2c3919de489d7c9a78513c8694 (patch)
tree6ba02414a7c5c586f0e2006407b28f6de8042e8b /g10/call-agent.c
parentscd:nks: Fix caching keygrip (more). (diff)
downloadgnupg2-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.c3
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))
{