[Pcsclite-cvs-commit] CVS Drivers/ccid/examples
CVS User rousseau
ludovic.rousseau@free.fr
Sun, 09 Jan 2005 14:27:41 -0700
Update of /cvsroot/pcsclite/Drivers/ccid/examples
In directory haydn:/tmp/cvs-serv982
Modified Files:
scardcontrol.c
Log Message:
The APDU now comes _after_ the CCID structure as described the CCID
specifications.
--- /cvsroot/pcsclite/Drivers/ccid/examples/scardcontrol.c 2004/10/20 13:57:38 1.12
+++ /cvsroot/pcsclite/Drivers/ccid/examples/scardcontrol.c 2005/01/09 21:27:41 1.13
@@ -18,7 +18,7 @@
*/
/*
- * $Id: scardcontrol.c,v 1.12 2004/10/20 13:57:38 rousseau Exp $
+ * $Id: scardcontrol.c,v 1.13 2005/01/09 21:27:41 rousseau Exp $
*/
#include <stdio.h>
@@ -238,20 +238,6 @@
/* verify PIN */
printf(" Secure verify PIN\n");
offset = 0;
- /* APDU: 00 20 00 00 08 30 30 30 30 00 00 00 00 */
- bSendBuffer[offset++] = 0x00; /* CLA */
- bSendBuffer[offset++] = 0x20; /* INS: VERIFY */
- bSendBuffer[offset++] = 0x00; /* P1 */
- bSendBuffer[offset++] = 0x00; /* P2 */
- bSendBuffer[offset++] = 0x08; /* Lc: 8 data bytes */
- bSendBuffer[offset++] = 0x30; /* '0' */
- bSendBuffer[offset++] = 0x30; /* '0' */
- bSendBuffer[offset++] = 0x30; /* '0' */
- bSendBuffer[offset++] = 0x30; /* '0' */
- bSendBuffer[offset++] = 0x00; /* '\0' */
- bSendBuffer[offset++] = 0x00; /* '\0' */
- bSendBuffer[offset++] = 0x00; /* '\0' */
- bSendBuffer[offset++] = 0x00; /* '\0' */
/* CCID PIN verification data structure */
bSendBuffer[offset++] = 0x00; /* bTimeOut */
@@ -269,6 +255,21 @@
bSendBuffer[offset++] = 0x00; /* " */
bSendBuffer[offset++] = 0x00; /* " */
+ /* APDU: 00 20 00 00 08 30 30 30 30 00 00 00 00 */
+ bSendBuffer[offset++] = 0x00; /* CLA */
+ bSendBuffer[offset++] = 0x20; /* INS: VERIFY */
+ bSendBuffer[offset++] = 0x00; /* P1 */
+ bSendBuffer[offset++] = 0x00; /* P2 */
+ bSendBuffer[offset++] = 0x08; /* Lc: 8 data bytes */
+ bSendBuffer[offset++] = 0x30; /* '0' */
+ bSendBuffer[offset++] = 0x30; /* '0' */
+ bSendBuffer[offset++] = 0x30; /* '0' */
+ bSendBuffer[offset++] = 0x30; /* '0' */
+ bSendBuffer[offset++] = 0x00; /* '\0' */
+ bSendBuffer[offset++] = 0x00; /* '\0' */
+ bSendBuffer[offset++] = 0x00; /* '\0' */
+ bSendBuffer[offset++] = 0x00; /* '\0' */
+
printf(" command:");
for (i=0; i<offset; i++)
printf(" %02X", bSendBuffer[i]);