diff --git a/src/openpgp/cmd_internal_aut.c b/src/openpgp/cmd_internal_aut.c index 869bb22..1c2203b 100644 --- a/src/openpgp/cmd_internal_aut.c +++ b/src/openpgp/cmd_internal_aut.c @@ -37,7 +37,7 @@ int cmd_internal_aut() { if (!ef) { return SW_REFERENCE_NOT_FOUND(); } - if (wait_button_pressed(EF_UIF_AUT) == true) { + if (wait_button_pressed_fid(EF_UIF_AUT) == true) { return SW_SECURE_MESSAGE_EXEC_ERROR(); } int r = PICOKEY_OK; diff --git a/src/openpgp/cmd_pso.c b/src/openpgp/cmd_pso.c index e2e9ba0..2da2194 100644 --- a/src/openpgp/cmd_pso.c +++ b/src/openpgp/cmd_pso.c @@ -66,7 +66,7 @@ int cmd_pso() { if (!ef) { return SW_REFERENCE_NOT_FOUND(); } - if (wait_button_pressed(pk_fid == EF_PK_SIG ? EF_UIF_SIG : EF_UIF_DEC) == true) { + if (wait_button_pressed_fid(pk_fid == EF_PK_SIG ? EF_UIF_SIG : EF_UIF_DEC) == true) { return SW_SECURE_MESSAGE_EXEC_ERROR(); } int r = PICOKEY_OK; diff --git a/src/openpgp/openpgp.c b/src/openpgp/openpgp.c index 132cc87..ed89ace 100644 --- a/src/openpgp/openpgp.c +++ b/src/openpgp/openpgp.c @@ -67,7 +67,7 @@ int openpgp_process_apdu(); extern uint32_t board_button_read(void); -bool wait_button_pressed(uint16_t fid) { +bool wait_button_pressed_fid(uint16_t fid) { uint32_t val = EV_PRESS_BUTTON; #ifndef ENABLE_EMULATION file_t *ef = search_by_fid(fid, NULL, SPECIFY_ANY); diff --git a/src/openpgp/openpgp.h b/src/openpgp/openpgp.h index c08ff75..316a61f 100644 --- a/src/openpgp/openpgp.h +++ b/src/openpgp/openpgp.h @@ -72,7 +72,7 @@ extern int check_pin(const file_t *pin, const uint8_t *data, size_t len); extern mbedtls_ecp_group_id get_ec_group_id_from_attr(const uint8_t *algo, size_t algo_len); extern int reset_sig_count(); extern uint16_t algo_dec, algo_aut, pk_dec, pk_aut; -extern bool wait_button_pressed(uint16_t fid); +extern bool wait_button_pressed_fid(uint16_t fid); extern void scan_files(); extern int load_aes_key(uint8_t *aes_key, file_t *fkey); extern int inc_sig_count();