[Pcsclite-cvs-commit] r1794 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at costa.debian.org
Wed Jan 11 10:34:08 UTC 2006
Author: rousseau
Date: 2006-01-11 10:34:06 +0000 (Wed, 11 Jan 2006)
New Revision: 1794
Modified:
trunk/Drivers/ccid/src/ccid.h
trunk/Drivers/ccid/src/commands.c
Log:
SecurePINModify(): bug circumvention for the GemPC Pinpad
Modified: trunk/Drivers/ccid/src/ccid.h
===================================================================
--- trunk/Drivers/ccid/src/ccid.h 2006-01-11 10:16:48 UTC (rev 1793)
+++ trunk/Drivers/ccid/src/ccid.h 2006-01-11 10:34:06 UTC (rev 1794)
@@ -118,6 +118,7 @@
#define GEMPC433 0x08E64433
#define GEMPCKEY 0x08E63438
#define GEMPCTWIN 0x08E63437
+#define GEMPCPINPAD 0x08E63478
#define CARDMAN3121 0x076B3021
#define LTC31 0x07830003
#define SCR331DI 0x04E65111
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2006-01-11 10:16:48 UTC (rev 1793)
+++ trunk/Drivers/ccid/src/commands.c 2006-01-11 10:34:06 UTC (rev 1794)
@@ -300,6 +300,28 @@
all bMsgIndex123 are filled */
TxBuffer[14] = TxBuffer[15] = TxBuffer[16] = 0; /* bMsgIndex123 */
}
+
+ /* bug circumvention for the GemPC Pinpad */
+ if (GEMPCPINPAD == ccid_descriptor->readerID)
+ {
+ /* The reader does not support, and actively reject, "max size reached"
+ * and "timeout occured" validation conditions */
+ if (0x02 != TxBuffer[10])
+ {
+ DEBUG_INFO2("Correct bEntryValidationCondition for GemPC Pinpad (was %d)",
+ TxBuffer[10]);
+ TxBuffer[10] = 0x02; /* validation key pressed */
+ }
+
+ /* the reader does not support any other value than 3 for the number
+ * of messages */
+ if (0x03 != TxBuffer[11])
+ {
+ DEBUG_INFO2("Correct bNumberMessages for GemPC Pinpad (was %d)",
+ TxBuffer[11]);
+ TxBuffer[11] = 0x03; /* 3 messages */
+ }
+ }
#endif
/* Build a CCID block from a PC/SC V2.1.2 Part 10 block */
More information about the Pcsclite-cvs-commit
mailing list