[Pcsclite-cvs-commit] r5990 - /trunk/Drivers/ccid/examples/scardcontrol.c
rousseau at users.alioth.debian.org
rousseau at users.alioth.debian.org
Sun Oct 2 12:10:08 UTC 2011
Author: rousseau
Date: Sun Oct 2 12:10:07 2011
New Revision: 5990
URL: http://svn.debian.org/wsvn/pcsclite/?sc=1&rev=5990
Log:
Use FEATURE_CCID_ESC_COMMAND to get the firmware of a GemPC reader
Modified:
trunk/Drivers/ccid/examples/scardcontrol.c
Modified: trunk/Drivers/ccid/examples/scardcontrol.c
URL: http://svn.debian.org/wsvn/pcsclite/trunk/Drivers/ccid/examples/scardcontrol.c?rev=5990&op=diff
==============================================================================
--- trunk/Drivers/ccid/examples/scardcontrol.c (original)
+++ trunk/Drivers/ccid/examples/scardcontrol.c Sun Oct 2 12:10:07 2011
@@ -431,6 +431,29 @@
printf("%02X ", bRecvBuffer[i]);
printf("\n");
}
+
+#ifdef GET_GEMPC_FIRMWARE
+ if (ccid_esc_command)
+ {
+ /* get GemPC firmware */
+ printf("Get GemPC Firmware\n");
+
+ /* this is specific to Gemalto readers */
+ bSendBuffer[0] = 0x02;
+ rv = SCardControl(hCard, ccid_esc_command, bSendBuffer,
+ 1, bRecvBuffer, sizeof(bRecvBuffer), &length);
+
+ printf(" Firmware: " GREEN);
+ for (i=0; i<length; i++)
+ printf("%02X ", bRecvBuffer[i]);
+ printf(NORMAL "\n");
+
+ bRecvBuffer[length] = '\0';
+ printf(" Firmware: " GREEN "%s" NORMAL" (length " GREEN "%ld" NORMAL " bytes)\n", bRecvBuffer, length);
+
+ PCSC_ERROR_CONT(rv, "SCardControl")
+ }
+#endif
if (0 == verify_ioctl)
{
More information about the Pcsclite-cvs-commit
mailing list