Site Tools

Sidebar

Smart Card Solution

User Manual

JavaCard API Samples

Java Card Specification

Knowledge Sharing

javacard:jcre:11.2_the_newly_installed_applet

11.2 The Newly Installed Applet

A single interface exists between the Installer and the applet that is being installed. After the Installer correctly prepares the applet for execution (performed steps such as loading and linking), the Installer shall invoke the applet's install method. This method is defined in the Applet class.

The precise mechanism by which an applet's install(byte[], short, byte) method is invoked from the Installer is a Java Card RE implementer-defined implementation detail. However, there shall be a context switch so that any context-related operations performed by the install method (such as creating new objects) are done in the context of the new applet and not in the context of the Installer. The Installer shall also ensure that array objects created in the class initialization () methods of the applet package are also owned by the context of the new applet.

The Installer shall not invoke the install(byte[], short, byte) method of an applet if another applet from the same package is active on the card. The applet instantiation shall be deemed unsuccessful.

The Installer shall ensure that during the execution of the install() method, the new applet (not the Installer) is the currently selected applet. In addition, any CLEAR_ON_DESELECT objects created during the install() method shall be associated with the selection context of the new applet.

The installation of an applet is deemed complete if all steps are completed without failure or an exception being thrown, up to and including successful return from executing the Applet.register method. At that point, the installed applet is selectable.

The maximum size of the parameter data is 127 bytes. The bArray parameter is a global array (install(byte[] bArray, short bOffset, byte bLength)), and for security reasons is zeroed after the return from the install method, just as the APDU buffer is zeroed on return from an applet's process method.

javacard/jcre/11.2_the_newly_installed_applet.txt · Last modified: 2017/05/13 04:06 (external edit)