Menu

#10 Install for load error

open
nobody
None
5
2010-03-21
2010-03-21
No

Commands Install for load is invalid according GP spec should be like this

try {
// data
bo.write(cap.getPackageAID().getLength());
bo.write(cap.getPackageAID().getBytes());
bo.write(sdAID.getLength());
bo.write(sdAID.getBytes());
bo.write(hash.length);
bo.write(hash);
bo.write(loadParams.length);
bo.write(loadParams);
bo.write((byte)0x00); //token lenght - mandatory according to gp spec
} catch (IOException ioe) {

}

byte [] data = bo.toByteArray();

CommandAPDU installForLoad = new CommandAPDU(CLA_GP, INSTALL, 0x02,
0x00, data, 0); -> LE should be set to 0

Discussion

  • Piotr Dereń

    Piotr Dereń - 2010-03-21

    Install for load error

     
  • Martin Paljak

    Martin Paljak - 2010-04-27

    Yes, the spec tells that Le is explicitly set to 00 all the time. At the same time, the documentation of the CommandAPDU for this case tells that the command is sent as Case 3 if Ne is 0, which should

    Does a card (which name?) not work for you without this patch?

     

Log in to post a comment.

MongoDB Logo MongoDB