[Pcsclite-cvs-commit] r1986 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at costa.debian.org
Tue Mar 28 08:55:33 CEST 2006
Author: rousseau
Date: 2006-03-28 06:55:31 +0000 (Tue, 28 Mar 2006)
New Revision: 1986
Modified:
trunk/Drivers/ccid/src/commands.c
Log:
SecurePINVerify() and SecurePINModify(): Make sure
bEntryValidationCondition is valid
The Cherry XX44 keyboard smart card reader crashes when a wrong value is
used
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2006-03-27 14:46:57 UTC (rev 1985)
+++ trunk/Drivers/ccid/src/commands.c 2006-03-28 06:55:31 UTC (rev 1986)
@@ -195,6 +195,15 @@
return IFD_NOT_SUPPORTED;
}
+ /* make sure bEntryValidationCondition is valid
+ * The Cherry XX44 reader crashes with a wrong value */
+ if ((0x00 == TxBuffer[7]) || (TxBuffer[7] > 0x07))
+ {
+ DEBUG_INFO2("Correct bEntryValidationCondition (was 0x%02X)",
+ TxBuffer[7]);
+ TxBuffer[7] = 0x02;
+ }
+
#ifdef BOGUS_PINPAD_FIRMWARE
/* bug circumvention for the GemPC Pinpad */
if (GEMPCPINPAD == ccid_descriptor->readerID)
@@ -365,6 +374,15 @@
return IFD_NOT_SUPPORTED;
}
+ /* Make sure bEntryValidationCondition is valid
+ * The Cherry XX44 reader crashes with a wrong value */
+ if ((0x00 == TxBuffer[10]) || (TxBuffer[10] > 0x07))
+ {
+ DEBUG_INFO2("Correct bEntryValidationCondition (was 0x%02X)",
+ TxBuffer[10]);
+ TxBuffer[10] = 0x02;
+ }
+
#ifdef BOGUS_PINPAD_FIRMWARE
/* some firmwares are buggy so we try to "correct" the frame */
/*
More information about the Pcsclite-cvs-commit
mailing list