From 34bfc3b2ef8ddb7120bd5de57f8e5ae802d46ab9 Mon Sep 17 00:00:00 2001 From: Pol Henarejos Date: Thu, 16 Nov 2023 20:12:48 +0100 Subject: [PATCH] otp must be initialized when selection fido or management applets. Signed-off-by: Pol Henarejos --- src/fido/fido.c | 2 ++ src/fido/management.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/src/fido/fido.c b/src/fido/fido.c index d340f33..79a935d 100644 --- a/src/fido/fido.c +++ b/src/fido/fido.c @@ -398,8 +398,10 @@ void scan_all() { scan_files(); } +extern void init_otp(); void init_fido() { scan_all(); + init_otp(); } bool wait_button_pressed() { diff --git a/src/fido/management.c b/src/fido/management.c index f835b73..83cbd43 100644 --- a/src/fido/management.c +++ b/src/fido/management.c @@ -31,6 +31,7 @@ const uint8_t man_aid[] = { 0xa0, 0x00, 0x00, 0x05, 0x27, 0x47, 0x11, 0x17 }; extern void scan_all(); +extern void init_otp(); int man_select(app_t *a) { a->process_apdu = man_process_apdu; a->unload = man_unload; @@ -38,6 +39,7 @@ int man_select(app_t *a) { res_APDU_size = strlen((char *) res_APDU); apdu.ne = res_APDU_size; scan_all(); + init_otp(); return CCID_OK; }