I need some help communicating with Desfire EV1 card. The library (winscard.dll) seems to be automatically handling all responses from the card that have an ADDITIONAL_FRAME (AF) byte so that the application receives already processed data. For example, I send the GetVersion command as follows:
[out] 90 60 00 00 00, and the response is:
[ in ] 04 01 01 01 00 18 05 04 01 01 01 04 18 05 04 83 71 2A 9F 43 80 BA 64 17 8F A0 07 15 91 00
Note: I wrapped the command data in ISO 7816 headers.
I expected the communication to be something like this:
[out] 90 60 00 00 00
[ in ] 04 01 01 01 00 18 05 91 AF[out] 90 AF 00 00 00
[ in ] 04 01 01 01 04 18 05 91 AF[out] 90 AF 00 00 00
[ in ] 04 83 71 2A 9F 43 80 BA 64 17 8F A0 07 15 91 00.
The same thing happens during card authentication so when I send
[out] 90 0A 00 00 01 00 00, I get back
[ in ] 91 00
instead of a card challenge.
Is there a way to disable this behaviour?
Thanks.