Java Reference
In-Depth Information
L ISTING 5.10 Continued
0x80 0xB4 0x05 0x00 0x20 0x05 0x00 0x36 0x00 0x0D 0x02 0x00 0x00 0x00 0x06
0x80 0x03 0x00 0x03 0x80 0x03 0x01 0x01 0x00 0x00 0x00 0x06 0x00
0x00 0x01 0x03 0x80 0x0A 0x01 0x03 0x80
0x0A 0x7F;
0x80 0xB4 0x05 0x00 0x19 0x06 0x03 0x80 0x0A 0x07 0x03 0x80 0x0A 0x09 0x03
0x80 0x0A 0x04 0x03 0x80 0x0A 0x05 0x06 0x80 0x10 0x02 0x03 0x80
0x0A 0x03 0x7F;
0x80 0xBC 0x05 0x00 0x00 0x7F;
// com/marinilli/b2/c5/javacard/RefLocation.cap
0x80 0xB2 0x09 0x00 0x00 0x7F;
0x80 0xB4 0x09 0x00 0x16 0x09 0x00 0x13 0x00 0x03 0x0E 0x25 0x2C 0x00 0x0C
0x05 0x0C 0x06 0x04 0x08 0x05 0x10 0x0C 0x08 0x09 0x06 0x09 0x7F;
0x80 0xBC 0x09 0x00 0x00 0x7F;
APDU script file for CAP file download generated.
To use the generated output, we need to cut the text header and footer leaving only the APDU
commands (comments are skipped by the tool). Then, we add right at the beginning of the text
file the following sequence:
// Select the installer applet
0xA4 0x04 0x00 0x09 0xa0 0x00 0x00 0x00 0x62 0x03 0x01 0x08 0x01 0x7F;
// CAP Begin
0x80 0xB0 0x00 0x00 0x00 0x7F;
While appending at the end the above-mentioned sequence:
// CAP End
0x80 0xBA 0x00 0x00 0x00 0x7F;
// create CardTest
0x80 0xB8 0x00 0x00 0x0b 0x09 0x1 0x0 0x0 0x0 0x1 0x3 0x1 0x04
0x01 0x00 0x7F;
The generated file, given in input at a suitable CAD via the APDUtool will install our applet on
the card in a three-step sequence:
The standard installer applet (already resident on the card) is instructed to download our
applet using an APDU sequence.
Data is transferred via APDUs to the installer applet that writes it in memory.
Finally, always using the installer applet, we create an instance of our newly downloaded
class that is ready for execution.
Search WWH ::

Custom Search