If slot is configured with a challenge-response app, do nothing when pressed.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-04-01 23:25:57 +02:00
parent ff498ebfdf
commit fa811e2a0f
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3

View File

@ -181,6 +181,9 @@ int otp_button_pressed(uint8_t slot) {
if (file_has_data(ef) == false) {
return 1;
}
if (otp_config->cfg_flags & CHAL_YUBICO && otp_config->tkt_flags & CHAL_RESP) {
return 2;
}
if (otp_config->tkt_flags & OATH_HOTP) {
uint8_t tmp_key[KEY_SIZE + 2];
tmp_key[0] = 0x01;