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

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Fri Jul 31 08:45:35 UTC 2009


Author: rousseau
Date: Fri Jul 31 08:45:34 2009
New Revision: 4356

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=4356
Log:
IFDHControl(): the (proprietary) get firmware version escape command is
allowed with a Gemalto reader

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=4356&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/ifdhandler.c (original)
+++ trunk/Drivers/ccid/src/ifdhandler.c Fri Jul 31 08:45:34 2009
@@ -1215,7 +1215,15 @@
 
 	if (IOCTL_SMARTCARD_VENDOR_IFD_EXCHANGE == dwControlCode)
 	{
-		if (FALSE == (DriverOptions & DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED))
+		int allowed = (DriverOptions & DRIVER_OPTION_CCID_EXCHANGE_AUTHORIZED);
+		int readerID = get_ccid_descriptor(reader_index) -> readerID;
+
+		if (VENDOR_GEMALTO == GET_VENDOR(readerID))
+			/* get firmware version escape command */
+			if ((1 == TxLength) && (0x02 == TxBuffer[0]))
+				allowed = TRUE;
+
+		if (!allowed)
 		{
 			DEBUG_INFO("ifd exchange (Escape command) not allowed");
 			return_value = IFD_COMMUNICATION_ERROR;




More information about the Pcsclite-cvs-commit mailing list