Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcre:4.1.3_default_applet_selection_behavior_on_opening_a_new_channel

4.1.3 Default Applet Selection Behavior on Opening a New Channel

The following default applet selection behavior occurs on opening a new logical channel.

When a MANAGE CHANNEL command is issued on the basic logical channel and a new logical channel is opened, the Java Card RE checks if there is a designated default applet instance for the newly opened logical channel. If so, the Java Card RE makes this applet instance the currently selected applet instance on the new logical channel, and the applet's select method (MultiSelectable.select method if required) is called. If this method throws an exception or returns false, then the Java Card RE closes the new logical channel. (The applet instance's process method is not called during default applet selection, because there is no SELECT FILE APDU). A default applet instance shall not require its process method to be called.

If a default applet instance is successfully selected, then APDU commands can be sent directly to the applet instance on that logical channel. If no applet is active, then only SELECT FILE commands for applet selection or MANAGE CHANNEL commands can be processed on that logical channel.

A MANAGE CHANNEL command issued over an I/O interface shall open a new logical channel only on the same I/O interface. Similarly a SELECT FILE command issued over an I/O interface to open a new logical channel shall open a new logical channel only on the same I/O interface.

The mechanism for specifying the default applet instance for a logical channel is not defined in the Java Card API. It is a Java Card RE implementation detail and is left to the individual implementers.

javacard/jcre/4.1.3_default_applet_selection_behavior_on_opening_a_new_channel.txt · Last modified: 2017/05/13 04:07 (external edit)