From: Simon Josefsson Date: Thu, 10 Nov 2011 10:24:48 +0000 (+0100) Subject: Fix firmware version check. X-Git-Tag: v1.6.2~2 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=dc833788656aa3928549b204f4bc1592c5079d76;p=yubikey-personalization Fix firmware version check. --- diff --git a/NEWS b/NEWS index 2e9c875..d62302e 100644 --- a/NEWS +++ b/NEWS @@ -5,6 +5,9 @@ Yubikey-personalize NEWS -- History of user-visible changes. -*- outline -*- ** Header files are now usable from C++. Reported by Giampaolo Bellini. +** ykchalresp incorrectly rejected some newer firmwares. +Reported by Giampaolo Bellini. + * Version 1.6.1 (released 2011-08-15) ** Fix test_args_to_config crash on some platform. diff --git a/ykchalresp.c b/ykchalresp.c index e7b6923..f7c8b6c 100644 --- a/ykchalresp.c +++ b/ykchalresp.c @@ -173,7 +173,8 @@ int check_firmware(YK_KEY *yk, bool verbose) } if (ykds_version_major(st) < 2 || - ykds_version_minor(st) < 2) { + (ykds_version_major(st) == 2 + && ykds_version_minor(st) < 2)) { fprintf(stderr, "Challenge-response not supported before YubiKey 2.2.\n"); free(st); return 0;