[Pcsclite-cvs-commit] r6775 - trunk/PCSC/UnitaryTests

ludovic.rousseau at free.fr ludovic.rousseau at free.fr
Fri Oct 18 11:55:13 UTC 2013


Author: rousseau
Date: 2013-10-18 11:55:13 +0000 (Fri, 18 Oct 2013)
New Revision: 6775

Modified:
   trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
Log:
Display the reader name, Pid and Vid


Modified: trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py
===================================================================
--- trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py	2013-10-18 11:41:58 UTC (rev 6774)
+++ trunk/PCSC/UnitaryTests/FEATURE_CCID_ESC_COMMAND_Gemalto_features.py	2013-10-18 11:55:13 UTC (rev 6775)
@@ -20,7 +20,10 @@
 
 from smartcard.System import readers
 from smartcard.pcsc.PCSCPart10 import (SCARD_SHARE_DIRECT,
-    SCARD_LEAVE_CARD, FEATURE_CCID_ESC_COMMAND, getFeatureRequest, hasFeature)
+    SCARD_LEAVE_CARD, FEATURE_CCID_ESC_COMMAND,
+    FEATURE_GET_TLV_PROPERTIES, getTlvProperties,
+    PCSCv2_PART10_PROPERTY_wIdVendor, PCSCv2_PART10_PROPERTY_wIdProduct,
+    getFeatureRequest, hasFeature)
 from smartcard.Exceptions import SmartcardException
 from itertools import izip
 
@@ -47,6 +50,13 @@
 
     feature_list = getFeatureRequest(card_connection)
 
+    get_tlv_properties = hasFeature(feature_list, FEATURE_GET_TLV_PROPERTIES)
+    if get_tlv_properties:
+        tlv = getTlvProperties(card_connection)
+        print "Reader:   ", readers()[0]
+        print "IdVendor:  0x%04X" % tlv['PCSCv2_PART10_PROPERTY_wIdVendor']
+        print "IdProduct: 0x%04X" % tlv['PCSCv2_PART10_PROPERTY_wIdProduct']
+
     ccid_esc_command = hasFeature(feature_list, FEATURE_CCID_ESC_COMMAND)
     if ccid_esc_command is None:
         raise Exception("FEATURE_CCID_ESC_COMMAND is not supported or allowed")




More information about the Pcsclite-cvs-commit mailing list