Selecting an app by AID requires the AID as argument.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2022-12-22 19:33:02 +01:00
parent 24522b9db8
commit 4682e5821f
3 changed files with 12 additions and 4 deletions

View File

@@ -30,7 +30,7 @@ int process_apdu() {
{
if (INS(apdu) == 0xA4 && P1(apdu) == 0x04 && (P2(apdu) == 0x00 || P2(apdu) == 0x4)) { //select by AID
for (int a = 0; a < num_apps; a++) {
if ((current_app = apps[a].select_aid(&apps[a]))) {
if ((current_app = apps[a].select_aid(&apps[a], apdu.data, apdu.nc))) {
return set_res_sw(0x90,0x00);
}
}
@@ -169,6 +169,7 @@ void apdu_thread() {
//printf("EXIT !!!!!!\r\n");
if (current_app && current_app->unload) {
current_app->unload();
current_app = NULL;
}
}