[Pcsclite-cvs-commit] r6869 - trunk/Drivers/ccid/src/openct

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Sat Mar 8 16:16:37 UTC 2014


Author: rousseau
Date: 2014-03-08 16:16:37 +0000 (Sat, 08 Mar 2014)
New Revision: 6869

Modified:
   trunk/Drivers/ccid/src/openct/proto-t1.c
Log:
t1_transceive(): add a new test on retries

The driver should not send R-blocks infinitely.

The problem was detected by a T=1 card on a TPDU pinpad reader with a
VERIFY command that send a WTX request before returning the SW code.


Modified: trunk/Drivers/ccid/src/openct/proto-t1.c
===================================================================
--- trunk/Drivers/ccid/src/openct/proto-t1.c	2014-03-08 16:14:39 UTC (rev 6868)
+++ trunk/Drivers/ccid/src/openct/proto-t1.c	2014-03-08 16:16:37 UTC (rev 6869)
@@ -314,6 +314,10 @@
 				/* ISO 7816-3 Rule 7.2 */
 				if (T1_R_BLOCK == t1_block_type(t1->previous_block[1]))
 				{
+					/* ISO 7816-3 Rule 7.4.2 */
+					if (retries <= 0)
+						goto resync;
+
 					DEBUG_COMM("Rule 7.2");
 					slen = t1_rebuild(t1, sdata);
 					continue;




More information about the Pcsclite-cvs-commit mailing list