Fix conditional build.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -459,12 +459,14 @@ void scan_all() {
|
|||||||
extern void init_otp();
|
extern void init_otp();
|
||||||
void init_fido() {
|
void init_fido() {
|
||||||
scan_all();
|
scan_all();
|
||||||
|
#ifdef ENABLE_OTP_APP
|
||||||
init_otp();
|
init_otp();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool wait_button_pressed() {
|
bool wait_button_pressed() {
|
||||||
uint32_t val = EV_PRESS_BUTTON;
|
uint32_t val = EV_PRESS_BUTTON;
|
||||||
#ifndef ENABLE_EMULATION
|
#if defined(PICO_PLATFORM) || defined(ESP_PLATFORM)
|
||||||
queue_try_add(&card_to_usb_q, &val);
|
queue_try_add(&card_to_usb_q, &val);
|
||||||
do {
|
do {
|
||||||
queue_remove_blocking(&usb_to_card_q, &val);
|
queue_remove_blocking(&usb_to_card_q, &val);
|
||||||
|
|||||||
@@ -40,7 +40,9 @@ int man_select(app_t *a, uint8_t force) {
|
|||||||
apdu.ne = res_APDU_size;
|
apdu.ne = res_APDU_size;
|
||||||
if (force) {
|
if (force) {
|
||||||
scan_all();
|
scan_all();
|
||||||
|
#ifdef ENABLE_OTP_APP
|
||||||
init_otp();
|
init_otp();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
return PICOKEY_OK;
|
return PICOKEY_OK;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -216,6 +216,7 @@ int otp_button_pressed(uint8_t slot) {
|
|||||||
if (otp_config->cfg_flags & CHAL_YUBICO && otp_config->tkt_flags & CHAL_RESP) {
|
if (otp_config->cfg_flags & CHAL_YUBICO && otp_config->tkt_flags & CHAL_RESP) {
|
||||||
return 2;
|
return 2;
|
||||||
}
|
}
|
||||||
|
#ifdef ENABLE_OATH_APP
|
||||||
if (otp_config->tkt_flags & OATH_HOTP) {
|
if (otp_config->tkt_flags & OATH_HOTP) {
|
||||||
uint8_t tmp_key[KEY_SIZE + 2];
|
uint8_t tmp_key[KEY_SIZE + 2];
|
||||||
tmp_key[0] = 0x01;
|
tmp_key[0] = 0x01;
|
||||||
@@ -257,6 +258,7 @@ int otp_button_pressed(uint8_t slot) {
|
|||||||
append_keyboard_buffer((const uint8_t *) "\r", 1);
|
append_keyboard_buffer((const uint8_t *) "\r", 1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
else if (otp_config->cfg_flags & SHORT_TICKET || otp_config->cfg_flags & STATIC_TICKET) {
|
else if (otp_config->cfg_flags & SHORT_TICKET || otp_config->cfg_flags & STATIC_TICKET) {
|
||||||
uint8_t fixed_size = FIXED_SIZE + UID_SIZE + KEY_SIZE;
|
uint8_t fixed_size = FIXED_SIZE + UID_SIZE + KEY_SIZE;
|
||||||
if (otp_config->cfg_flags & SHORT_TICKET) { // Not clear which is the purpose of SHORT_TICKET
|
if (otp_config->cfg_flags & SHORT_TICKET) { // Not clear which is the purpose of SHORT_TICKET
|
||||||
|
|||||||
Reference in New Issue
Block a user