Skip to Main Content

Java Card

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problem with receiving data for T=0 Case 4 APDU

843851Oct 1 2007 — edited May 9 2008
Hi,

From wat i have read so far, for T=0 protocol Case 4 APDUs, once i have obtained a 0x9000, this meant that i can send a get Response command to retrieve the response data.

Get Response Command (sent after getting a 0x9000)
Cla: 00, INS: C0, P1:00, P2:00, LE: the size expected

However, i kept getting a *0x6E00* response which states that the CLA is not supported.

Can anyone help me with this?

I tried testing the CLA value from (0x00 to 0x0F) and (0xA0 to 0xAF) but all of them failed to work.

As i am building an applet for both T=0 and T=1 protocols must there be any changes to my applet code? Thus far, all cases of 1 to 3 APDU works perfectly for both T=1 and T=0 w/o any changes to my applet code.

Applet Code (the process method on receiving the required INS will call this method):
-----

public void getPublicModulus(APDU apdu){

byte[] buf = apdu.getBuffer();
byte[] data = new byte[4];

Util.arrayCopy(buf, ISO7816.OFFSET_CDATA, data, (short)0,(short)
data.length);

//Basically, here i will retrieve the offset_ and size_ data from buf
//which i ommitted for easier reading

short le = apdu.setOutgoing();
modulus = new byte[128];

pub_key.getModulus(modulus,(short)0);
apdu.setOutgoingLength(size_);
Util.arrayCopy(modulus, (short)offset_, buf, (short)0, size_);

apdu.sendBytes((short)0, (byte)size_);

}


-----
Im testing the T=0 APDU on Gemxpresso Java cards.
Any help is appreciated. Thanks in advance!

Edited by: 30cents on Sep 30, 2007 10:57 PM
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 6 2008
Added on Oct 1 2007
7 comments
633 views