G'day,

I am investigating writing a card applet, and using pcsc-lite to communicate to 
the card.

My understanding of the calling stack is as follows:

  application -> pcsc-lite -> ccid -> reader -> card -> applet

I am interested in how to handle the ISO7816-4 SELECT command.

For T0 protocol, it seems that the application will send a SELECT command and 
get back a 61xx response. The application then sends a GET RESPONSE command to 
fetch the SELECT response data and get back a 9000 response.

For T1 protocol, it seems that the SELECT command will return the response data 
and a 9000 response to the application.

I understand that ISO7816-4 Annex A mentions that a case 4 command APDU (such 
as a SELECT with Le present) should be split up into 2 x command APDU by the 
"transmission system" when T0 protocol is used, but I am wondering what 
constitutes the "transmission system" in this context. Is it pcsc-lite? The 
ccid driver? Within the reader?

The corresponding question is how the applet should handle SELECT: does it 
return response data and 9000 in all cases, or only if an Le is present in the 
APDU, or does the applet need to recognize when to return 61xx for SELECT and 
also handle a GET RESPONSE command APDU?

In short, I'm trying to figure out what stuff I need to handle in the applet 
and what stuff is already handled for me by pcsc-lite, ccid, the reader, the 
card manager, etc.

-- Geoff

_______________________________________________
Muscle mailing list
[email protected]
http://lists.drizzle.com/mailman/listinfo/muscle

Reply via email to