[pkg-opensc-commit] [opensc] 221/295: recognize T=0 limitation of sending 255 bytes

Eric Dorland eric at moszumanska.debian.org
Sat Jun 24 21:11:34 UTC 2017


This is an automated email from the git hooks/post-receive script.

eric pushed a commit to branch master
in repository opensc.

commit 70313512ad9fc4b9e5d672493c3fe86b81de02bd
Author: Frank Morgner <frankmorgner at gmail.com>
Date:   Sun Apr 2 22:35:59 2017 +0200

    recognize T=0 limitation of sending 255 bytes
    
    fixes https://github.com/OpenSC/OpenSC/issues/1009
---
 src/libopensc/card.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/libopensc/card.c b/src/libopensc/card.c
index 9ad3266..fba0832 100644
--- a/src/libopensc/card.c
+++ b/src/libopensc/card.c
@@ -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 {

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-opensc/opensc.git



More information about the pkg-opensc-commit mailing list