INSTALL for LOAD and LOAD commands
843851Sep 1 2003 — edited Sep 8 2003Hi I'm writitng my own utility to perform application loading. I have already sucessfully completed the INITIALISE UPDATE and EXTERNAL AUTHENTICATE commands on the card.
There is no Security Domain in use, the card is a blank JCOP10 card with the standard immutable Executable Load File's installed.
The INSTALL for LOAD command seq I am using:
P1 = 0x02 = INSTALL for LOAD
Data = 08 = AID Len, followed by 8 bytes of AID, this has been made up for now.
00 = No security domain
00 = No load file DAP
00 = No load parameter data (never seen this use documented)
00 = No load token
APDU CMD CLA=80 INS=E6 P1=02 P2=00 Lc=0Dh/13d "08A000010203FFFFFF00000000" Le=00h/0d
APDU RSP SW1=61 SW2=01 [NO DATA] (Command processed without error. 1 byte response available, use GetResp command to retrieve)
APDU CMD CLA=00 INS=C0 P1=00 P2=00 Lc=00h/0d Le=01h/1d
APDU RSP SW1=90 SW2=00 data="00" len=1 (OK - Command executed without error)
INSTALL for LOAD = 9000
Now my first 2 LOAD commands, notice I have very short data, some 9 bytes in each LOAD command. I will use larger ones later once its working, however there is something in the Executable Load File data (which is my raw .CAP file from the output of the 'converter' app) in the first 10 bytes that the CardManager doesn't seem to like at all and responds with SW1SW2=6A80. If I make the ELF data payload larger than 9 bytes I only get the chance to send the first block of data to the card, since I guess it must look in the CAP file data and become unhappy with something in those first 10 bytes.
P1 = 00 = more data follows
p2 = 00 = data block sequence, starting at 0
DATA = C4 tag
= 09 length
= rest is the next chunk of data since the last LOAD command
APDU CMD CLA=80 INS=E8 P1=00 P2=00 Lc=0Bh/11d "C409504B03040A00000000"
APDU RSP SW1=90 SW2=00 [NO DATA] (OK - Command executed without error)
LOAD @0 len=9 = 9000
APDU CMD CLA=80 INS=E8 P1=00 P2=01 Lc=0Bh/11d "C40900C295212F777F27C2"
APDU RSP SW1=6A SW2=80 [NO DATA] (Incorrect parameters in data filed (CrtFil command))
LOAD @9 len=9 = 6A80
I believe the JCOP10 card to be Open Platform Card Spec v2.0.1 compliant. When I run a 'cardman.exe capinfo <file...>' I get in the header.cap section "CAP version 2.1" does this have any relation to OPCS v2.1.1. Is the CAP file in a newer format and the card doesn't like it ?
Does the 'cardman.exe upload <file...>' convert the CAP file data in someway before it gets to the card ?
NB - This application loads fine when I use the JCOP10 tools, "cardman.exe upload <file>" to do so.
Help,
George