Only accept those applets that load successfully.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2023-10-11 21:04:45 +02:00
parent eef2f190f2
commit 1b5a7496e1

View File

@@ -38,10 +38,11 @@ int process_apdu() {
} }
} }
current_app = &apps[a]; current_app = &apps[a];
current_app->select_aid(current_app); if (current_app->select_aid(current_app) == CCID_OK) {
return set_res_sw(0x90, 0x00); return set_res_sw(0x90, 0x00);
} }
} }
}
return set_res_sw(0x6a, 0x82); return set_res_sw(0x6a, 0x82);
} }
if (current_app && current_app->process_apdu) { if (current_app && current_app->process_apdu) {