otp must be initialized when selection fido or management applets.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2023-11-16 20:12:48 +01:00
parent d985cf6301
commit 34bfc3b2ef
No known key found for this signature in database
GPG Key ID: C0095B7870A4CCD3
2 changed files with 4 additions and 0 deletions

View File

@ -398,8 +398,10 @@ void scan_all() {
scan_files();
}
extern void init_otp();
void init_fido() {
scan_all();
init_otp();
}
bool wait_button_pressed() {

View File

@ -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;
}