[Pcsclite-cvs-commit] r6811 - trunk/Drivers/ccid/src

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Mon Jan 6 14:18:30 UTC 2014


Author: rousseau
Date: 2014-01-06 14:18:30 +0000 (Mon, 06 Jan 2014)
New Revision: 6811

Modified:
   trunk/Drivers/ccid/src/ifdhandler.c
Log:
Add specific PIN min & max sizes for SmartTerminal ST-2xxx

The Cherry GmbH SmartTerminal ST-2xxx reader has a min PIN size of 0
digits and a max PIN size of 25 (0x19) digits.

Thanks to Dominik Heidler for the bug report
https://github.com/OpenSC/OpenSC/issues/199


Modified: trunk/Drivers/ccid/src/ifdhandler.c
===================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c	2013-12-20 10:19:01 UTC (rev 6810)
+++ trunk/Drivers/ccid/src/ifdhandler.c	2014-01-06 14:18:30 UTC (rev 6811)
@@ -1579,6 +1579,25 @@
 			RxBuffer[p++] = 0x02;	/* validation key pressed */
 		}
 
+		/* Cherry GmbH SmartTerminal ST-2xxx */
+		if (CHERRYST2000 == ccid_descriptor -> readerID)
+		{
+			/* bMinPINSize */
+			RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMinPINSize;
+			RxBuffer[p++] = 1;	/* length */
+			RxBuffer[p++] = 0;	/* min PIN size */
+
+			/* bMaxPINSize */
+			RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bMaxPINSize;
+			RxBuffer[p++] = 1;	/* length */
+			RxBuffer[p++] = 25;	/* max PIN size */
+
+			/* bEntryValidationCondition */
+			RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bEntryValidationCondition;
+			RxBuffer[p++] = 1;	/* length */
+			RxBuffer[p++] = 0x02;	/* validation key pressed */
+		}
+
 		/* bPPDUSupport */
 		RxBuffer[p++] = PCSCv2_PART10_PROPERTY_bPPDUSupport;
 		RxBuffer[p++] = 1;	/* length */




More information about the Pcsclite-cvs-commit mailing list