Closed dmercer-google closed 3 years ago
The GP spec 2.3.1, sect. 1.3.2 only allows short APDUs for GET DATA. The whole internal code is handling Lc and Le only for short APDUs. Just increasing the buffer size should not help in general. Can you please give an example when this is failing?
The GP spec 2.3.1, sect. 1.3.2 only allows short APDUs for GET DATA. The whole internal code is handling Lc and Le only for short APDUs. Just increasing the buffer size should not help in general. Can you please give an example when this is failing?
Good catch. I have reverted the change to get_data.
Great. I will take care of the extended APU support then also in the PC/SC connection layer to make this complete. I assume you are talking about extended APDUs when saying "chained APDU"?
Great. I will take care of the extended APU support then also in the PC/SC connection layer to make this complete. I assume you are talking about extended APDUs when saying "chained APDU"?
Yup, it happens with Extended APDUs responding to a send_apdu. As far as I can tell the seg fault was happening in Apples PCSC layer so it may not be something we can fix. Looks like they were not checking the size of the buffer that was being passed and were writing past it.
Which of the cards have you used for extended APDUs? A NXP or Infineon? I might have access to a MacOS Catalina, where I could replicate this issue.
NXP.
Increases the max received APDU length for send_apdu and get_data to 64k. This addresses the issue where PCSC (at least on a Mac) was seg faulting when the response consists of chained APDUs