recognize T=0 limitation of sending 255 bytes

fixes https://github.com/OpenSC/OpenSC/issues/1009
This commit is contained in:
Frank Morgner 2017-04-02 22:35:59 +02:00
parent f21fe1de8d
commit 70313512ad
1 changed files with 2 additions and 1 deletions

View File

@ -164,7 +164,8 @@ size_t sc_get_max_send_size(const sc_card_t *card)
max_send_size = card->max_send_size;
/* initialize max_send_size to a meaningfull value */
if (card->caps & SC_CARD_CAP_APDU_EXT) {
if (card->caps & SC_CARD_CAP_APDU_EXT
&& card->reader->active_protocol != SC_PROTO_T0) {
if (!max_send_size)
max_send_size = 65535;
} else {