据我所知,当JCRE接收SELECT APDU命令时,首先,它在其注册表中搜索命令指示的AID . 如果未在其注册表中找到AID,则返回 6A82
. 但是如果JCRE找到它,它将调用所选applet的 deselect()
方法,并在收到 True
之后,它将调用所请求的applet的 select()
方法 . 如果从该方法收到 True
,请将该applet标记为已选中 .
我的问题:
1-如果第一个小程序(当前选定的小程序)在JCRE调用其 deselect()
方法时返回 False
会发生什么?小程序是否仍然是 Selected
?
2-如果第二个小程序(请求的小程序)在JCRE调用其 select()
方法时返回 False
会发生什么?在这种情况下将选择哪个小程序?安全域默认为?
1 回答
What happens if the first applet (Currently Selected Applet) returns false when JCRE calls its deselect() method? Does the applet remain selected?
不,一旦调用并返回
Applet.deselect()
方法,将取消选择小程序 . applet无法阻止这种情况发生 . Applet.deselect()没有返回值 . 即使在此方法中抛出异常仍然不会阻止取消选择applet .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?
由于之前的applet已被取消选择且新的applet被拒绝被选中,因此不会选择任何applet .