From fa811e2a0f9c13072a2e6831c5f03a5db1756dac Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Sat, 1 Apr 2023 23:25:57 +0200 Subject: [PATCH] If slot is configured with a challenge-response app, do nothing when pressed. Signed-off-by: Pol Henarejos --- src/fido/otp.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/fido/otp.c b/src/fido/otp.c index 08a0d09..e217612 100644 --- a/src/fido/otp.c +++ b/src/fido/otp.c @@ -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;