[Pcsclite-cvs-commit] Drivers/ccid/src commands.c,1.13,1.14

rousseau@haydn.debian.org rousseau@haydn.debian.org


Update of /cvsroot/pcsclite/Drivers/ccid/src
In directory haydn:/tmp/cvs-serv2969/src

Modified Files:
	commands.c 
Log Message:
bPINOperation is not passed in the user command since the command is
"PIN Verification" and nothing else


Index: commands.c
===================================================================
RCS file: /cvsroot/pcsclite/Drivers/ccid/src/commands.c,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- commands.c	24 May 2004 12:58:43 -0000	1.13
+++ commands.c	26 May 2004 07:50:07 -0000	1.14
@@ -124,7 +124,7 @@
 	_ccid_descriptor *ccid_descriptor = get_ccid_descriptor(lun);
 	int length = 0;
 
-	/* PIN verification data structure WITHOUT TeoPrologue & bPINOperation */
+	/* PIN verification data structure WITHOUT TeoPrologue */
 	if (TxBuffer[4] /* Lc */
 		+ 5 /* CLA, INS, P1, P2, Lc */
 		+ 11 /* CCID PIN verification data structure */ == TxLength)
@@ -135,27 +135,27 @@
 		memcpy(cmd +11, TxBuffer + TxBuffer[4] + 5, 11);
 
 		/* TeoPrologue not used */
-		memset(cmd +11 + 11, 0, 3);
+		memset(cmd +11 +11, 0, 3);
 
 		/* copy the APDU */
 		memcpy(cmd +11 +14, TxBuffer, TxLength-11);
 
 		length = 14 + TxLength;
 	}
-	/* PIN verification data structure WITH TeoPrologue & bPINOperation */
+	/* PIN verification data structure WITH TeoPrologue */
 	else if (TxBuffer[4] /* Lc */
 		+ 5 /* CLA, INS, P1, P2, Lc */
-		+ 15 /* CCID PIN verification data structure */ == TxLength)
+		+ 14 /* CCID PIN verification data structure */ == TxLength)
 	{
-		i2dw(TxLength, cmd+1);	/* command length */
+		i2dw(TxLength+1, cmd+1);	/* command length */
 
 		/* copy the CCID data structure */
-		memcpy(cmd +10, TxBuffer + TxBuffer[4] + 5, 15);
+		memcpy(cmd +11, TxBuffer + TxBuffer[4] + 5, 14);
 
 		/* copy the APDU */
-		memcpy(cmd +10 +15, TxBuffer, TxLength-15);
+		memcpy(cmd +11 +14, TxBuffer, TxLength-14);
 
-		length = 10 + TxLength;
+		length = 11 + TxLength;
 	}
 	else
 	{