[Pcsclite-cvs-commit] r3318 - /trunk/Drivers/ccid/src/commands.c

rousseau at users.alioth.debian.org rousseau at users.alioth.debian.org
Sun Feb 15 15:55:30 UTC 2009


Author: rousseau
Date: Sun Feb 15 15:55:30 2009
New Revision: 3318

URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=3318
Log:
SecurePINVerify(): also check the value of bmPINBlockString in case of
Case 1 APDU and SPR532

Thanks to Peter Koch for the patch

Modified:
    trunk/Drivers/ccid/src/commands.c

Modified: trunk/Drivers/ccid/src/commands.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/src/commands.c?rev=3318&op=diff
==============================================================================
--- trunk/Drivers/ccid/src/commands.c (original)
+++ trunk/Drivers/ccid/src/commands.c Sun Feb 15 15:55:30 2009
@@ -370,7 +370,11 @@
 	}
 
 	/* SPR532 and Case 1 APDU */
-	if ((SPR532 == ccid_descriptor->readerID) && (TxBuffer[15] == 4))
+	if ((SPR532 == ccid_descriptor->readerID)
+		/* bmPINBlockString = 0 => PIN length not inserted in APDU */
+		&& (0 == TxBuffer[3])
+		/* case 1 APDU */
+		&& (4 == TxBuffer[15]))
 	{
 		RESPONSECODE return_value;
 		unsigned char cmd_tmp[] = { 0x80, 0x02, 0x00 };




More information about the Pcsclite-cvs-commit mailing list