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

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Sat Mar 22 17:38:22 UTC 2014


Author: rousseau
Date: 2014-03-22 17:38:22 +0000 (Sat, 22 Mar 2014)
New Revision: 6875

Modified:
   trunk/Drivers/ccid/src/Info.plist.src
   trunk/Drivers/ccid/src/ccid.c
Log:
Add support of DRIVER_OPTION_DISABLE_PIN_RETRIES

The Gemalto pinpad reader sends a VERIFY command with no PIN
value in order to retreive the remaining retries from the card.
Some cards (like the OpenPGP card) do not support this.

It is now possible to disable this behavior from the Gemalto Pinpad and
Covadis V?\195?\169ga Alpha.

Closes Alioth bug
https://alioth.debian.org/tracker/index.php?func=detail&aid=314005&group_id=30105&atid=410088


Modified: trunk/Drivers/ccid/src/Info.plist.src
===================================================================
--- trunk/Drivers/ccid/src/Info.plist.src	2014-03-22 17:18:02 UTC (rev 6874)
+++ trunk/Drivers/ccid/src/Info.plist.src	2014-03-22 17:38:22 UTC (rev 6875)
@@ -89,6 +89,11 @@
 	 32: power on the card at 1.8V, then 3V and then 5V
 	 48: let the reader decide
 
+	0x40: DRIVER_OPTION_DISABLE_PIN_RETRIES
+		The Gemalto pinpad reader sends a VERIFY command with no PIN
+		value in order to retreive the remaining retries from the card.
+		Some cards (like the OpenPGP card) do not support this.
+
 	Default value: 0
 	-->
 

Modified: trunk/Drivers/ccid/src/ccid.c
===================================================================
--- trunk/Drivers/ccid/src/ccid.c	2014-03-22 17:18:02 UTC (rev 6874)
+++ trunk/Drivers/ccid/src/ccid.c	2014-03-22 17:38:22 UTC (rev 6875)
@@ -436,6 +436,21 @@
 					DEBUG_COMM("Failed to load l10n strings");
 					return_value = IFD_COMMUNICATION_ERROR;
 				}
+
+				if (DriverOptions & DRIVER_OPTION_DISABLE_PIN_RETRIES)
+				{
+					/* disable VERIFY from reader */
+					const unsigned char cmd2[] = {0xb5, 0x00};
+					length_res = sizeof(res);
+					if (IFD_SUCCESS == CmdEscape(reader_index, cmd2, sizeof(cmd2), res, &length_res, DEFAULT_COM_READ_TIMEOUT))
+					{
+						DEBUG_COMM("Disable SPE retry counter successfull");
+					}
+					else
+					{
+						DEBUG_CRITICAL("Failed to disable SPE retry counter");
+					}
+				}
 			}
 			break;
 




More information about the Pcsclite-cvs-commit mailing list