1
votes

As far as I know, When JCRE Receive an SELECT APDU command, first of all, it search its registry table for the AID that the command indicates. If it doesn't found the AID in its Registry Table returns 6A82. But if JCRE found it, it will call the deselect() method of the selected applet, and after receiving a True, It will call select() method of the requested applet. if it receive a True from that method, mark that applet as selected.

My questions:

1- What happens if the first applet (Currently Selected Applet) returns False when JCRE calls its deselect() method? Does the applet remains Selected?

2- What happens if the second applet (The requested Applet) returns False when JCRE calls its select() method?which one of applets will be select in this case? the default is Security Domain?

1
I already read this question : stackoverflow.com/questions/25958082/… But it doesn't help me to receive the answer for this question.TheGoodUser

1 Answers

3
votes

What happens if the first applet (Currently Selected Applet) returns false when JCRE calls its deselect() method? Does the applet remain selected?

No, once the Applet.deselect() method was called and returned, the applet will be deselected. There is no way for the applet to prevent this. The Applet.deselect() does not have a return value. Even throwing an exception in this method would still not prevent the applet from being deselected.

What happens if the second applet (the requested Applet) returns false when JCRE calls its select() method? Which one of the applets will be select in this case?

As the previous applet has already been deselected and the new applet refused to be selected, no applet will be selected then.