[Pcsclite-cvs-commit] r1981 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at costa.debian.org
Mon Mar 27 16:17:59 CEST 2006
Author: rousseau
Date: 2006-03-27 14:17:58 +0000 (Mon, 27 Mar 2006)
New Revision: 1981
Modified:
trunk/Drivers/ccid/src/ccid.h
trunk/Drivers/ccid/src/commands.c
Log:
SecurePINModify(): circumvent a bug in Cherry XX44 keyboard firmware
Modified: trunk/Drivers/ccid/src/ccid.h
===================================================================
--- trunk/Drivers/ccid/src/ccid.h 2006-03-27 13:34:36 UTC (rev 1980)
+++ trunk/Drivers/ccid/src/ccid.h 2006-03-27 14:17:58 UTC (rev 1981)
@@ -135,6 +135,7 @@
#define OZ776 0x0B977762
#define SPR532 0x04E6E003
#define MYSMARTPAD 0x09BE0002
+#define CHERRYXX44 0x046a0010
/* Escape sequence codes */
#define ESC_GEMPC_SET_ISO_MODE 1
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2006-03-27 13:34:36 UTC (rev 1980)
+++ trunk/Drivers/ccid/src/commands.c 2006-03-27 14:17:58 UTC (rev 1981)
@@ -365,6 +365,15 @@
TxBuffer[14] = TxBuffer[15] = TxBuffer[16] = 0; /* bMsgIndex123 */
}
+ /* the bug is a bit different than for the Cherry ST 2000C
+ * with bNumberMessages < 3 the command seems to be accepted
+ * and the card sends 6B 80 */
+ if (CHERRYXX44 == ccid_descriptor->readerID)
+ {
+ TxBuffer[11] = 0x03; /* set bNumberMessages to 3 so that
+ all bMsgIndex123 are filled */
+ }
+
/* bug circumvention for the GemPC Pinpad */
if (GEMPCPINPAD == ccid_descriptor->readerID)
{
More information about the Pcsclite-cvs-commit
mailing list