Java Card - CLA byte value

Hello All,

I am trying to modify & run the sample Wallet example. However it gives me different results when I use different CLA values..

If CLA =0x80 and I send the following APDU to get the balance

80 50 00 00 02// It gives me correct reponse 00 00 90 00

However, If I modify the code and use CLA=0x90 and send the following APDU: 90 50 00 00 02// It sends me response 6C 02

Where is the problem? If I am not wrong, 6C XX means Wrong length with XX denoting the correct length. What should be the command APDU I should send in this case.

Please Help.

Cheers,

Shivam

[628 byte] By [shiv_sinhaa] at [2007-11-26 23:12:20]
# 1
Wallet applet does not support CLA=0x90.If you look through applet code - there's applet CLA byte specified - it is 0x80... other values cause apllet to return error code
alToSa at 2007-7-10 14:09:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 2
ISO standard describes which values should be used for CLA. You cannot just choose any value
alToSa at 2007-7-10 14:09:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 3

If I go through ISO standards it specifies 0x8x and 0x9x values can be application properiatry values...

What I don't understand is Why in the case of 0x90, it returns me with 6C 02 . Incase, this CLA is not supported it should throw some exception...

I hope it clears....

Cheers,

Shivam

shiv_sinhaa at 2007-7-10 14:09:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...
# 4

In the ISO7816-4 standard, the CLA byte, bit 5, indicates command chaining. So you indicate in the Le byte that you expect 02 bytes. Card gives a warning that 02 bytes should be indicated in the Le byte --> resend the command with CLA = 80.

The card OS handles the command if command chaining is indicated.

lexdabeara at 2007-7-10 14:09:59 > top of Java-index,Java Mobility Forums,Consumer and Commerce...