简体   繁体   中英

JCRE Behavior after receiving an SELECT APDU command

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM