1
0
mirror of https://github.com/Yubico/yubico-pam.git synced 2025-02-27 06:54:15 +01:00

challenge_response: reject bad slot

This commit is contained in:
Fredrik Thulin 2011-12-06 14:37:57 +01:00
parent 4ce59833ba
commit c795e84bef

2
util.c
View File

@ -167,6 +167,8 @@ int challenge_response(YK_KEY *yk, int slot,
case 2: case 2:
yk_cmd = (hmac == true) ? SLOT_CHAL_HMAC2 : SLOT_CHAL_OTP2; yk_cmd = (hmac == true) ? SLOT_CHAL_HMAC2 : SLOT_CHAL_OTP2;
break; break;
default:
return 0;
} }
if (!yk_write_to_key(yk, yk_cmd, challenge, len)) if (!yk_write_to_key(yk, yk_cmd, challenge, len))