From: joernchen of Phenoelit Date: Sat, 18 Jan 2014 19:39:56 +0000 (+0100) Subject: Bugfix: -Y should not work with -6 or -8 X-Git-Tag: v1.15.1~38 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=e58080b7d20df6e1a6d2ae0f1cd118a1d80c28ee;p=yubikey-personalization Bugfix: -Y should not work with -6 or -8 --- diff --git a/ykchalresp.c b/ykchalresp.c index 370291f..ff81840 100644 --- a/ykchalresp.c +++ b/ykchalresp.c @@ -250,7 +250,7 @@ static int challenge_response(YK_KEY *yk, int slot, /* HMAC responses are 160 bits, Yubico 128 */ expect_bytes = (hmac == true) ? 20 : 16; - if(digits){ + if(digits && hmac){ offset = response[19] & 0xf ; bin_code = (response[offset] & 0x7f) << 24 | (response[offset+1] & 0xff) << 16