[Pcsclite-cvs-commit] r1701 - trunk/Drivers/ccid/src
Ludovic Rousseau
rousseau at costa.debian.org
Sun Oct 30 14:44:25 UTC 2005
Author: rousseau
Date: 2005-10-30 14:44:25 +0000 (Sun, 30 Oct 2005)
New Revision: 1701
Modified:
trunk/Drivers/ccid/src/commands.c
Log:
SecurePINModify(): correct management of bMsgIndex2 and bMsgIndex3
Modified: trunk/Drivers/ccid/src/commands.c
===================================================================
--- trunk/Drivers/ccid/src/commands.c 2005-10-30 14:43:16 UTC (rev 1700)
+++ trunk/Drivers/ccid/src/commands.c 2005-10-30 14:44:25 UTC (rev 1701)
@@ -297,17 +297,25 @@
* currently */
continue;
+ if (15 == b) /* bMsgIndex2 */
+ {
+ /* in CCID the bMsgIndex2 is present only if bNumberMessage != 0 */
+ if (0 == TxBuffer[11])
+ continue;
+ }
+
if (16 == b) /* bMsgIndex3 */
{
/*
- * SPR 532 has no display but requires _all_ bMsgIndex
- * fields with bNumberMessage set to 0.
+ * SPR 532 and Cherry ST 2000C has no display but requires _all_
+ * bMsgIndex fields with bNumberMessage set to 0.
*/
- if (SPR532 == ccid_descriptor->readerID)
+ if ((SPR532 == ccid_descriptor->readerID)
+ || (CHERRYST2000 == ccid_descriptor->readerID))
{
cmd[21] = 0x00; /* set bNumberMessages to 0 */
- cmd[a] = cmd[a-1] = cmd[a-2] = 0; /* bMsgIndex123 */
- a++;
+ cmd[a] = cmd[a-1] = cmd[a+1] = 0; /* bMsgIndex123 */
+ a += 2;
continue;
}
More information about the Pcsclite-cvs-commit
mailing list