]> err.no Git - yubikey-personalization/commitdiff
Bugfix: -Y should not work with -6 or -8
authorjoernchen of Phenoelit <joernchen@phenoelit.de>
Sat, 18 Jan 2014 19:39:56 +0000 (20:39 +0100)
committerjoernchen of Phenoelit <joernchen@phenoelit.de>
Sat, 18 Jan 2014 19:39:56 +0000 (20:39 +0100)
ykchalresp.c

index 370291f2b40b1b8925485e3cfa02407f55aa63bd..ff81840cd7b35856cfc970ec65ccf4abed892ad3 100644 (file)
@@ -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