This content has been marked as final. Show 9 replies
not really, "select application" can return whatever you like, and most applets do return something: a file control information template (fci) giving the AID and other info (for an example, try to select a card manager). That's a good practice: because you can select an application with only part of an AID, the applet usually replies with this complete AID. [tell the card: "Hello ath", she will respond "Hello, understood, but if you want to know, my full name is Athena" :) ]
Jin, can you post your whole process() algorithm for the select command, including: how are you returning data? do you use apdu.SendBytes() ?
if you have a contactless card it is possible that Le is always zero, because according to iso7816 zero means "all available data".
why? because a contactless card (or a T=1 card) can return any length without prior indication, so it does not need Le.
or it might be a bug in your javacard implementation...
You can use apdu.SetOutgoingLength() to indicate the real length of the response, and usually the card OS (below javacard) relies on that to create a 6CXX response if there's a problem.
A workaround can be: Read Le in the apdu buffer at the correct offset, and send a 6CXX SW yourself if you're not satisfied with it.
I'm expecting more details from you to fully understand the problem.
she will respondshould be He will respond :P
Well i was talking about the usual behavior of the SELECT command that it just tells you weather an applet is select successfully. But yes you are right, I was unaware of getting data bank from selection. I also get something useful from your post :)
Thank you Sebastien~~
Posting whole process() is a little bit complicated because It is still work in progress with a company, which makes a contract.
I think a little bit posting is okay. I need to check.
This applet can be supported on both contact and contactless interfaces. However, it focuses on the contact interface as a payment application.
In order to indicate real length of the response, I will have to test the Le using the apdu.SetOutgoingLength() as you mentioned. :)