[Pcsclite-cvs-commit] r1800 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at costa.debian.org
Mon Jan 16 13:45:51 UTC 2006
Author: rousseau
Date: 2006-01-16 13:45:50 +0000 (Mon, 16 Jan 2006)
New Revision: 1800
Modified:
trunk/Drivers/ccid/src/commands.c
trunk/Drivers/ccid/src/commands.h
Log:
SecurePINVerify(): bug circumvention for the GemPC Pinpad
(bNumberMessage)
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2006-01-12 21:51:25 UTC (rev 1799)
+++ trunk/Drivers/ccid/src/commands.c 2006-01-16 13:45:50 UTC (rev 1800)
@@ -153,7 +153,7 @@
*
****************************************************************************/
RESPONSECODE SecurePINVerify(unsigned int reader_index,
- const unsigned char TxBuffer[], unsigned int TxLength,
+ unsigned char TxBuffer[], unsigned int TxLength,
unsigned char RxBuffer[], unsigned int *RxLength)
{
unsigned char cmd[11+14+CMD_BUF_SIZE];
@@ -193,6 +193,21 @@
return IFD_NOT_SUPPORTED;
}
+#ifdef BOGUS_PINPAD_FIRMWARE
+ /* bug circumvention for the GemPC Pinpad */
+ if (GEMPCPINPAD == ccid_descriptor->readerID)
+ {
+ /* the firmware reject the cases: 00h No string and FFh default
+ * CCID message. The only value supported is 01h (display 1 message) */
+ if (0x01 != TxBuffer[8])
+ {
+ DEBUG_INFO2("Correct bNumberMessage for GemPC Pinpad (was %d)",
+ TxBuffer[8]);
+ TxBuffer[8] = 0x01;
+ }
+ }
+#endif
+
/* Build a CCID block from a PC/SC V2.1.2 Part 10 block */
for (a = 11, b = 0; b < TxLength; b++)
{
Modified: trunk/Drivers/ccid/src/commands.h
===================================================================
--- trunk/Drivers/ccid/src/commands.h 2006-01-12 21:51:25 UTC (rev 1799)
+++ trunk/Drivers/ccid/src/commands.h 2006-01-16 13:45:50 UTC (rev 1800)
@@ -29,7 +29,7 @@
unsigned char buffer[], int voltage);
RESPONSECODE SecurePINVerify(unsigned int reader_index,
- const unsigned char TxBuffer[], unsigned int TxLength,
+ unsigned char TxBuffer[], unsigned int TxLength,
unsigned char RxBuffer[], unsigned int *RxLength);
RESPONSECODE SecurePINModify(unsigned int reader_index,
More information about the Pcsclite-cvs-commit
mailing list