[Pcsclite-muscle] What's responsible to filter out Le in Case 4 C-APDUs under T=0?

Michael StJohns mstjohns at comcast.net
Wed Feb 9 18:42:49 PST 2022

On 2/9/2022 3:30 PM, Francois Grieu wrote:
>> > • A case 4 APDU cannot be used. It is the responsibility of the > 
>> application or the service provider to generate a « get response » if 
>> > they need it.
>> This is not exactly what ISO7816-3 says, but it's sort of a reasonable
>> interpretation of how to map APDUs to TPDUs for T=0. Case 3 and Case 4
>> APDUs have the same format for the first command TPDU.
> Does PCSC specify the interface between the application and 
> ScardTransmit ? I though it was one layer closer to the reader. In 
> which case "A case 4 APDU cannot be used" would not necessarily apply 
> to the input of ScardTransmit. 

This is from the definition of the IFD_Transmit_to_ICC function in PCSC 
3 - Section   Given that the CommandData definition matches up 
pretty closely with how SCardTransmit is defined (e.g. pioSendPci 
followed by pbSendBuffer)  I'd say whoever designed SCardTransmit 
probably did a pretty close mapping between the two.  (Maybe look at 
Ludovic's driver code to confirm at least one implementation?).

This also seems on point: 
as it appears to be how a reader driver registers itself to handle requests.

My guess is that SCardTransmit does minor struct formatting and then 
turns around and calls the function pointed to by RDF_TRANSMIT.

Enjoy - Mike

More information about the pcsclite-muscle mailing list