i.e.
sending command >A404000008, the error appears, expected to be 0x6099. Perhaps someone can help me with this problem. Thanks for all the help.
My code:
Code: Select all
public static void install(byte[] bArray, short bOffset, byte bLength) {
// GP-compliant JavaCard applet registration
pin = new OwnerPIN((byte) 0X03,(byte) 0X08);
pin.update(PIN_NO, (short) 0, (byte) 0x08);
new DZCARD().register(bArray, (short) (bOffset + 1), bArray[bOffset]);
}
public void process(APDU apdu) {
// Good practice: Return 9000 on SELECT
if (selectingApplet()) {
return;
}
byte[] buf = apdu.getBuffer();
switch (buf[ISO7816.OFFSET_INS]) {
case (byte) 0x04:
if(buf[ISO7816.OFFSET_CLA]!=(byte) 0xA4)
ISOException.throwIt(ISO7816.SW_CLA_NOT_SUPPORTED);
else
{
short byte_read=(short)(apdu.setIncomingAndReceive());
byte x = Util.arrayCompare(buf, ISO7816.OFFSET_CDATA, APPLET_ID, (short)0 , byte_read);
if(x!= (byte) 0x00)
{
ISOException.throwIt(ISO7816.SW_FILE_NOT_FOUND);
}
}
ISOException.throwIt((short) 0x6099);
break;