[Pcsclite-cvs-commit] r4358 - /trunk/Drivers/ccid/src/ifdhandler.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jul 31 09:33:22 UTC 2009


Author: rousseau
Date: Fri Jul 31 09:33:22 2009
New Revision: 4358

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4358
Log:
IFDHControl(): the (proprietary) switch interface escape command is
allowed on the Gemalto GemProx DU

Modified:
    trunk/Drivers/ccid/src/ifdhandler.c

Modified: trunk/Drivers/ccid/src/ifdhandler.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/ifdhandler.c?rev=4358&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Fri Jul 31 09:33:22 2009
@@ -1219,9 +1219,23 @@
 		int readerID = get_ccid_descriptor(reader_index) -> readerID;
 
 		if (VENDOR_GEMALTO == GET_VENDOR(readerID))
+		{
+			char switch_interface[] = { 0x52, 0xF8, 0x04, 0x01, 0x00 };
+
 			/* get firmware version escape command */
 			if ((1 == TxLength) && (0x02 == TxBuffer[0]))
 				allowed = TRUE;
+
+			/* switch interface escape command on the GemProx DU
+			 * the next byte in the command is the interface:
+			 * 0x01 switch to contactless interface
+			 * 0x02 switch to contact interface
+			 */
+			if ((GEMALTOPROXDU == readerID)
+				&& (6 == TxLength)
+				&& (0 == memcmp(TxBuffer, switch_interface, sizeof(switch_interface))))
+				allowed = TRUE;
+		}
 
 		if (!allowed)
 		{




More information about the Pcsclite-cvs-commit mailing list