You can subscribe to this list here.
2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
---|---|---|---|---|---|---|---|---|---|---|---|---|
2008 |
Jan
(10) |
Feb
(10) |
Mar
|
Apr
(1) |
May
|
Jun
|
Jul
|
Aug
(17) |
Sep
(9) |
Oct
(10) |
Nov
(2) |
Dec
(5) |
2009 |
Jan
(17) |
Feb
(8) |
Mar
(10) |
Apr
(1) |
May
|
Jun
(11) |
Jul
(18) |
Aug
|
Sep
|
Oct
(10) |
Nov
(40) |
Dec
(4) |
2010 |
Jan
(2) |
Feb
(5) |
Mar
(13) |
Apr
(14) |
May
(27) |
Jun
(86) |
Jul
(1) |
Aug
(12) |
Sep
|
Oct
(2) |
Nov
(3) |
Dec
(5) |
2011 |
Jan
|
Feb
(2) |
Mar
|
Apr
(3) |
May
|
Jun
|
Jul
(11) |
Aug
(1) |
Sep
(3) |
Oct
(65) |
Nov
|
Dec
(1) |
2012 |
Jan
(1) |
Feb
(4) |
Mar
(6) |
Apr
(6) |
May
|
Jun
(4) |
Jul
|
Aug
|
Sep
(12) |
Oct
(3) |
Nov
(1) |
Dec
|
2013 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(3) |
Nov
|
Dec
(1) |
2014 |
Jan
(2) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
(4) |
Oct
(1) |
Nov
(24) |
Dec
(10) |
2015 |
Jan
(1) |
Feb
(10) |
Mar
|
Apr
|
May
(1) |
Jun
(15) |
Jul
(4) |
Aug
(2) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
From: <lu...@us...> - 2010-05-15 12:15:17
|
Revision: 410 http://pyscard.svn.sourceforge.net/pyscard/?rev=410&view=rev Author: ludov Date: 2010-05-15 12:15:08 +0000 (Sat, 15 May 2010) Log Message: ----------- Do not try to match the card ATR with a name. The regular expression code is too slow. Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-05-15 12:02:06 UTC (rev 409) +++ trunk/contrib/parseATR/stress_test.py 2010-05-15 12:15:08 UTC (rev 410) @@ -22,6 +22,7 @@ import parseATR List = "/usr/local/share/pcsc/smartcard_list.txt" +Match = 0 def stress(atr_list): @@ -44,11 +45,12 @@ print e else: print txt - card = parseATR.match_atr(atr) - if card: - print "Possibly identified card:", "\n\t".join(card) - else: - print "Unknown card" + if Match: + card = parseATR.match_atr(atr) + if card: + print "Possibly identified card:", "\n\t".join(card) + else: + print "Unknown card" print This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-15 12:02:12
|
Revision: 409 http://pyscard.svn.sourceforge.net/pyscard/?rev=409&view=rev Author: ludov Date: 2010-05-15 12:02:06 +0000 (Sat, 15 May 2010) Log Message: ----------- replace '*' by '0' in the ATR regular expression Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-05-15 11:53:21 UTC (rev 408) +++ trunk/contrib/parseATR/stress_test.py 2010-05-15 12:02:06 UTC (rev 409) @@ -32,6 +32,7 @@ continue atr = atr.replace('.', '0') + atr = atr.replace('*', '0') # remove traling newline atr = atr.rstrip() This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-15 11:53:27
|
Revision: 408 http://pyscard.svn.sourceforge.net/pyscard/?rev=408&view=rev Author: ludov Date: 2010-05-15 11:53:21 +0000 (Sat, 15 May 2010) Log Message: ----------- remove useless import string Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-05-15 11:52:54 UTC (rev 407) +++ trunk/contrib/parseATR/stress_test.py 2010-05-15 11:53:21 UTC (rev 408) @@ -19,7 +19,6 @@ """ import sys -import string import parseATR List = "/usr/local/share/pcsc/smartcard_list.txt" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-15 11:53:00
|
Revision: 407 http://pyscard.svn.sourceforge.net/pyscard/?rev=407&view=rev Author: ludov Date: 2010-05-15 11:52:54 +0000 (Sat, 15 May 2010) Log Message: ----------- create a function Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-05-07 16:17:12 UTC (rev 406) +++ trunk/contrib/parseATR/stress_test.py 2010-05-15 11:52:54 UTC (rev 407) @@ -24,11 +24,9 @@ List = "/usr/local/share/pcsc/smartcard_list.txt" -if __name__ == "__main__": - if len(sys.argv) > 1: - List = sys.argv[1] - for atr in open(List): +def stress(atr_list): + for atr in open(atr_list): if not atr.startswith("3"): continue if "[" in atr: @@ -53,3 +51,9 @@ print "Unknown card" print + +if __name__ == "__main__": + if len(sys.argv) > 1: + List = sys.argv[1] + + stress(List) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Wim L. <wi...@hh...> - 2010-05-09 07:00:32
|
On 5/7/10 8:22 AM, jean daniel aussel wrote: > looks like a nice development to share, although as Ludovic mentioned > an alternative is to use the pkcs#11 python wrapper. Would be > interested to have a look and see what can be incorporated as 3rd > party contribution to pyscard, since I guess this would be a quite > substantial sample of pyscard usage. I'll clean up some more of the cruft and put it somewhere then (or mail it to this list?). There are basically three things that might be of interest: - a PIV module and class that provides methods roughly corresponding to the card commands defined in SP800-73-3 part 2, and some routines for dealing with various PIV (or other DoD smartcard) data structures; - an example script that does various things to/with a PIV card; - a fairly generic BER/DER helper class that grew out of a collection of parsing/formatting functions; it's arguably not smartcard-specific and presumably duplicates code in other projects, but it's what the PIV code needed. :) Some parts might be better off as separate modules in pyscard --- the routines for dealing with ISO7816's oddball SIMPLE-TLV format, and the command/response chaining support (which seems like it could be implemented as an error checker, but I don't really grok pyscard's architecture well enough to see how to do that). On 5/7/10 7:03 AM, Ludovic Rousseau wrote: > Why don't you use a PKCS#11 library like OpenSC [1] to abstract your > PIV card [2]? Well, largely because I wanted to understand how to interact with the smartcard's native interface, not just with the PKCS#11 abstraction. But also because opensc's pkcs11 adapter didn't work for me out-of-the-box --- I think it was a combination of an installation error and needing to initialize the card further before it would be recognized, but its failures are quite cryptic, so I'm not really sure. (And, well, I used my PIV code + pyscard to do the necessary initialization.) I also find that using Python to explore an unfamiliar interface is more pleasant than digging through layer after layer of C shared libraries, each one of which throws away the underlying library's diagnostic information :/ |
From: <jda...@us...> - 2010-05-07 16:17:18
|
Revision: 406 http://pyscard.svn.sourceforge.net/pyscard/?rev=406&view=rev Author: jdaussel Date: 2010-05-07 16:17:12 +0000 (Fri, 07 May 2010) Log Message: ----------- Definition of MAX_BUFFER_SIZE_EXTENDED for older releases of pcsc-lite, e.g. on fedora 6 Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/scard.i Modified: trunk/pyscard/src/smartcard/scard/scard.i =================================================================== --- trunk/pyscard/src/smartcard/scard/scard.i 2010-05-07 13:31:59 UTC (rev 405) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-05-07 16:17:12 UTC (rev 406) @@ -178,6 +178,10 @@ #else #include <reader.h> #endif + // undefined on older releases + #ifndef MAX_BUFFER_SIZE_EXTENDED + #define MAX_BUFFER_SIZE_EXTENDED (4 + 3 + (1<<16) + 3) + #endif #else // !PCSCLITE // SCARD_CTL_CODE defined in WinSmCrd.h included by Win32 winscard.h // MAX_BUFFER_SIZE_EXTENDED is pcsc-lite specific @@ -199,9 +203,9 @@ %{ -// +// // these functions are only available on win32 PCSC -// +// #ifdef WIN32 /////////////////////////////////////////////////////////////////////////////// @@ -409,7 +413,7 @@ // // SCardControl does not have the same prototype on Mac OS X Tiger -// +// #ifdef __TIGER__ /////////////////////////////////////////////////////////////////////////////// @@ -420,10 +424,10 @@ ) { SCARDRETCODE lRet; - + pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; - + lRet = (mySCardControl)( hcard, pblSendBuffer->ab, @@ -442,10 +446,10 @@ ) { SCARDRETCODE lRet; - + pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; - + lRet = (mySCardControl)( hcard, controlCode, @@ -514,12 +518,12 @@ #ifdef __TIGER__ // SCardReleaseContext on Mac OS X Tiger fails if SCardConnect is not called with an established // context, even on a dummy reader - if( SCARD_S_SUCCESS==lRet ) + if( SCARD_S_SUCCESS==lRet ) { SCARDHANDLE hcard; SCARDDWORDARG dwarg; (mySCardConnectA)( *phContext, "dummy-reader", SCARD_SHARE_SHARED, - SCARD_PROTOCOL_ANY, &hcard, &dwarg ); + SCARD_PROTOCOL_ANY, &hcard, &dwarg ); } #endif // __TIGER__ @@ -884,9 +888,9 @@ %typemap(doc, name="dwControlCode", type="") (SCARDDWORDARG dwControlCode) "dwControlCode: the control code to send"; -// +// // these functions are only available on win32 PCSC -// +// #ifdef WIN32 /////////////////////////////////////////////////////////////////////////////// @@ -1253,7 +1257,7 @@ valid. After a smart card context handle has been set by SCardEstablishContext(), it may become not valid if the resource manager service has been shut down. - + from smartcard.scard import * hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) hresult = SCardIsValidContext( hcontext ) @@ -1265,15 +1269,15 @@ %feature("docstring") DOCSTRING_ISVALIDCONTEXT; %rename(SCardIsValidContext) _IsValidContext( SCARDCONTEXT hcontext ); SCARDRETCODE _IsValidContext( SCARDCONTEXT hcontext ); - + /////////////////////////////////////////////////////////////////////////////// %define DOCSTRING_GETATTRIB " - + This function get an attribute from the IFD Handler. - + For PCSC lite, the list of possible attributes is: - + * SCARD_ATTR_ASYNC_PROTOCOL_TYPES * SCARD_ATTR_ATR_STRING * SCARD_ATTR_CHANNEL_ID @@ -1318,9 +1322,9 @@ * SCARD_ATTR_VENDOR_IFD_TYPE * SCARD_ATTR_VENDOR_IFD_VERSION * SCARD_ATTR_VENDOR_NAME - + For Windows Resource Manager, the list of possible attributes is: - + * SCARD_ATTR_VENDOR_NAME * SCARD_ATTR_VENDOR_IFD_TYPE * SCARD_ATTR_VENDOR_IFD_VERSION @@ -1363,12 +1367,12 @@ * SCARD_ATTR_DEVICE_FRIENDLY_NAME_W * SCARD_ATTR_DEVICE_SYSTEM_NAME_W * SCARD_ATTR_SUPRESS_T1_IFS_REQUEST - + Not all the dwAttrId values listed above may be implemented in the IFD Handler you are using. And some dwAttrId values not listed here may be implemented. - - + + from smartcard.scard import * ... establish context and connect to card ... hresult, attrib = SCardGetAttrib( hcard, SCARD_ATTR_ATR_STRING ) @@ -1381,16 +1385,16 @@ %feature("docstring") DOCSTRING_GETATTRIB; %rename(SCardGetAttrib) _GetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* ATTRIBUTES ); SCARDRETCODE _GetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* ATTRIBUTES ); - + /////////////////////////////////////////////////////////////////////////////// %define DOCSTRING_SETATTRIB " - - This function sets an attribute from the IFD Handler. Not all attributes are supported by all readers nor can + + This function sets an attribute from the IFD Handler. Not all attributes are supported by all readers nor can they be set at all times. - + For PCSC lite, the list of possible attributes is: - + * SCARD_ATTR_ASYNC_PROTOCOL_TYPES * SCARD_ATTR_ATR_STRING * SCARD_ATTR_CHANNEL_ID @@ -1435,9 +1439,9 @@ * SCARD_ATTR_VENDOR_IFD_TYPE * SCARD_ATTR_VENDOR_IFD_VERSION * SCARD_ATTR_VENDOR_NAME - + For Windows Resource Manager, the list of possible attributes is: - + * SCARD_ATTR_VENDOR_NAME * SCARD_ATTR_VENDOR_IFD_TYPE * SCARD_ATTR_VENDOR_IFD_VERSION @@ -1480,12 +1484,12 @@ * SCARD_ATTR_DEVICE_FRIENDLY_NAME_W * SCARD_ATTR_DEVICE_SYSTEM_NAME_W * SCARD_ATTR_SUPRESS_T1_IFS_REQUEST - + Not all the dwAttrId values listed above may be implemented in the IFD Handler you are using. And some dwAttrId values not listed here may be implemented. - - + + from smartcard.scard import * ... establish context and connect to card ... hresult, attrib = SCardSetAttrib( hcard, SCARD_ATTR_VENDOR_NAME, ['G', 'e', 'm', 'a', 'l', 't', 'o'] ) @@ -1497,13 +1501,13 @@ %feature("docstring") DOCSTRING_SETATTRIB; %rename(SCardSetAttrib) _SetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* ATTRIBUTESIN ); SCARDRETCODE _SetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* ATTRIBUTESIN ); - + #endif // !__TIGER__ // // SCardControl does not have the same prototype on Mac OS X Tiger -// +// #ifdef __TIGER__ /////////////////////////////////////////////////////////////////////////////// %define DOCSTRING_CONTROL @@ -1538,8 +1542,8 @@ " This function sends a control command to the reader connected to by SCardConnect(). It returns a result and the control response. - - + + from smartcard.scard import * hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) hresult, hcard, dwActiveProtocol = SCardConnect( This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: jean d. a. <jda...@gm...> - 2010-05-07 15:22:23
|
Hi Wim, looks like a nice development to share, although as Ludovic mentioned an alternative is to use the pkcs#11 python wrapper. Would be interested to have a look and see what can be incorporated as 3rd party contribution to pyscard, since I guess this would be a quite substantial sample of pyscard usage. best regards, Jean-Daniel Aussel |
From: Ludovic R. <lud...@gm...> - 2010-05-07 14:04:00
|
Hello, 2010/5/7 Wim Lewis <wi...@hh...>: > I've been working on getting pyscard to work with PIV cards (NIST SP > 800-73, FIPS 201, that sort of thing). I have most of the command set > working: logging in, key generation, signing, storing personalization > data, etc. > > I'm posting this both in case there are other people who might be > interested in this, and because I'd (eventually) like to get the PIV > code I've written merged back into pyscard. Right now it's a bit messy > since I didn't really know what I was doing when I started. Why don't you use a PKCS#11 library like OpenSC [1] to abstract your PIV card [2]? If you want a Python interface you can then use pykcs11 [3]. > Also, FWIW, pyscard is working fine on OS X 10.6/SnowLeopard, with > minimal tweaks (eg removing ppc from the list of architectures to build). The code in subversion should work without any change. Bye [1] http://www.opensc-project.org/opensc [2] http://www.opensc-project.org/opensc/wiki/UnitedStatesPIV [3] http://www.bit4id.org/trac/pykcs11/ -- Dr. Ludovic Rousseau |
From: <lu...@us...> - 2010-05-07 13:32:06
|
Revision: 405 http://pyscard.svn.sourceforge.net/pyscard/?rev=405&view=rev Author: ludov Date: 2010-05-07 13:31:59 +0000 (Fri, 07 May 2010) Log Message: ----------- Add support of FEATURE_GET_TLV_PROPERTIES from PCSC v2 part 10 revision 2.02.08 April 2010 Revision Links: -------------- http://pyscard.svn.sourceforge.net/pyscard/?rev=2&view=rev Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 13:02:18 UTC (rev 404) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 13:31:59 UTC (rev 405) @@ -69,11 +69,36 @@ "FEATURE_CCID_ESC_COMMAND" : FEATURE_CCID_ESC_COMMAND } +# properties returned by FEATURE_GET_TLV_PROPERTIES +PCSCv2_PART10_PROPERTY_wLcdLayout = 1 +PCSCv2_PART10_PROPERTY_bEntryValidationCondition = 2 +PCSCv2_PART10_PROPERTY_bTimeOut2 = 3 +PCSCv2_PART10_PROPERTY_wLcdMaxCharacters = 4 +PCSCv2_PART10_PROPERTY_wLcdMaxLines = 5 +PCSCv2_PART10_PROPERTY_bMinPINSize = 6 +PCSCv2_PART10_PROPERTY_bMaxPINSize = 7 +PCSCv2_PART10_PROPERTY_sFirmwareID = 8 + +Properties = { +"PCSCv2_PART10_PROPERTY_wLcdLayout" : PCSCv2_PART10_PROPERTY_wLcdLayout, +"PCSCv2_PART10_PROPERTY_bEntryValidationCondition": PCSCv2_PART10_PROPERTY_bEntryValidationCondition, +"PCSCv2_PART10_PROPERTY_bTimeOut2": PCSCv2_PART10_PROPERTY_bTimeOut2, +"PCSCv2_PART10_PROPERTY_wLcdMaxCharacters": PCSCv2_PART10_PROPERTY_wLcdMaxCharacters, +"PCSCv2_PART10_PROPERTY_wLcdMaxLines": PCSCv2_PART10_PROPERTY_wLcdMaxLines, +"PCSCv2_PART10_PROPERTY_bMinPINSize": PCSCv2_PART10_PROPERTY_bMinPINSize, +"PCSCv2_PART10_PROPERTY_bMaxPINSize": PCSCv2_PART10_PROPERTY_bMaxPINSize, +"PCSCv2_PART10_PROPERTY_sFirmwareID": PCSCv2_PART10_PROPERTY_sFirmwareID +} + # we already have: Features['FEATURE_x'] = FEATURE_x # we will now also have: Features[FEATURE_x] = 'FEATURE_x' for k in Features.keys(): Features[Features[k]] = k +for k in Properties.keys(): + Properties[Properties[k]] = k + + def getFeatureRequest(cardConnection): """ Get the list of Part10 features supported by the reader. @@ -85,7 +110,7 @@ features = [] while (len(response) > 0): tag = response[0] - control = (((((response[2]<<8) + response[3])<<8) + response[4])<<8) + response[5] + control = (((((response[2] << 8) + response[3]) << 8) + response[4]) << 8) + response[5] try: features.append([Features[tag], control]) except KeyError: @@ -93,6 +118,7 @@ del response[:6] return features + def hasFeature(featureList, feature): """ return the controlCode for a feature or None @@ -105,6 +131,7 @@ if f[0] == feature or Features[f[0]] == feature: return f[1] + def getPinProperties(cardConnection, featureList=None, controlCode=None): """ return the PIN_PROPERTIES structure @@ -132,6 +159,56 @@ return d + +def getTlvProperties(cardConnection, featureList=None, controlCode=None): + """ return the GET_TLV_PROPERTIES structure + + cardConnection: CardConnection object + featureList: feature list as returned by getFeatureRequest() + controlCode: control code for FEATURE_GET_TLV_PROPERTIES + + return: a dict """ + if controlCode is None: + if featureList is None: + featureList = getFeatureRequest(cardConnection) + controlCode = hasFeature(featureList, FEATURE_GET_TLV_PROPERTIES) + + if controlCode is None: + return + + response = cardConnection.control(controlCode, []) + d = { + 'raw': response, + } + + # create a new list to consume it + tmp = list(response) + while tmp: + tag = tmp[0] + len = tmp[1] + data = tmp[2:2 + len] + + if PCSCv2_PART10_PROPERTY_sFirmwareID == tag: + # convert to a string + data = "".join([chr(c) for c in data]) + # we now suppose the value is an integer + elif 1 == len: + # byte + data = data[0] + elif 2 == len: + # 16 bits value + data = data[1] * 256 + data[0] + elif 4 == len: + # 32 bits value + data = ((data[3] * 256 + data[2]) * 256 + data[1]) * 256 + data[0] + + # store the value in the dictionnary + d[Properties[tag]] = data + + del tmp[0:2 + len] + + return d + if __name__ == '__main__': """Small sample illustrating the use of PCSCPart10.""" from smartcard.pcsc.PCSCReader import readers @@ -145,4 +222,12 @@ print hasFeature(features, FEATURE_VERIFY_PIN_START) print hasFeature(features, FEATURE_VERIFY_PIN_DIRECT) - print getPinProperties(cc) + properties = getPinProperties(cc) + print "\nPinProperties:" + for k in properties.keys(): + print " %s: %s" % (k, properties[k]) + + print "\nTlvProperties:" + properties = getTlvProperties(cc) + for k in properties.keys(): + print " %s: %s" % (k, properties[k]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-07 13:02:24
|
Revision: 404 http://pyscard.svn.sourceforge.net/pyscard/?rev=404&view=rev Author: ludov Date: 2010-05-07 13:02:18 +0000 (Fri, 07 May 2010) Log Message: ----------- Add FEATURE_GET_TLV_PROPERTIES and FEATURE_CCID_ESC_COMMAND Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 13:00:13 UTC (rev 403) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 13:02:18 UTC (rev 404) @@ -44,6 +44,8 @@ FEATURE_WRITE_DISPLAY = 0x0F FEATURE_GET_KEY = 0x10 FEATURE_IFD_DISPLAY_PROPERTIES = 0x11 +FEATURE_GET_TLV_PROPERTIES = 0x12 +FEATURE_CCID_ESC_COMMAND = 0x13 Features = { "FEATURE_VERIFY_PIN_START" : FEATURE_VERIFY_PIN_START, @@ -62,7 +64,9 @@ "FEATURE_MODIFY_PIN_DIRECT_APP_ID" : FEATURE_MODIFY_PIN_DIRECT_APP_ID, "FEATURE_WRITE_DISPLAY" : FEATURE_WRITE_DISPLAY, "FEATURE_GET_KEY" : FEATURE_GET_KEY, -"FEATURE_IFD_DISPLAY_PROPERTIES" : FEATURE_IFD_DISPLAY_PROPERTIES +"FEATURE_IFD_DISPLAY_PROPERTIES" : FEATURE_IFD_DISPLAY_PROPERTIES, +"FEATURE_GET_TLV_PROPERTIES" : FEATURE_GET_TLV_PROPERTIES, +"FEATURE_CCID_ESC_COMMAND" : FEATURE_CCID_ESC_COMMAND } # we already have: Features['FEATURE_x'] = FEATURE_x This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-07 13:00:20
|
Revision: 403 http://pyscard.svn.sourceforge.net/pyscard/?rev=403&view=rev Author: ludov Date: 2010-05-07 13:00:13 +0000 (Fri, 07 May 2010) Log Message: ----------- getPinProperties(): update to the PIN_PROPERTIES structure from PCSC v2 part 10 Revision 2.02.06, April 2009 Fields wLcdMaxCharacters and wLcdMaxLines have been removed Revision Links: -------------- http://pyscard.svn.sourceforge.net/pyscard/?rev=2&view=rev Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 12:57:39 UTC (rev 402) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 13:00:13 UTC (rev 403) @@ -122,10 +122,8 @@ 'raw': response, 'LcdLayoutX': response[0], 'LcdLayoutY': response[1], - 'LcdMaxCharacters': response[2]<<8 + response[3], - 'LcdMaxLines': response[4]<<8 + response[5], - 'EntryValidationCondition': response[6], - 'TimeOut2': response[7] + 'EntryValidationCondition': response[2], + 'TimeOut2': response[3] } return d This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-07 12:57:45
|
Revision: 402 http://pyscard.svn.sourceforge.net/pyscard/?rev=402&view=rev Author: ludov Date: 2010-05-07 12:57:39 +0000 (Fri, 07 May 2010) Log Message: ----------- getFeatureRequest(): remove debug output Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 12:55:52 UTC (rev 401) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 12:57:39 UTC (rev 402) @@ -82,7 +82,6 @@ while (len(response) > 0): tag = response[0] control = (((((response[2]<<8) + response[3])<<8) + response[4])<<8) + response[5] - print tag, control try: features.append([Features[tag], control]) except KeyError: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-05-07 12:55:59
|
Revision: 401 http://pyscard.svn.sourceforge.net/pyscard/?rev=401&view=rev Author: ludov Date: 2010-05-07 12:55:52 +0000 (Fri, 07 May 2010) Log Message: ----------- getFeatureRequest(): do not fail if a unkown tag is reported by the PCSC driver Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-04-29 14:59:27 UTC (rev 400) +++ trunk/pyscard/src/smartcard/pcsc/PCSCPart10.py 2010-05-07 12:55:52 UTC (rev 401) @@ -82,7 +82,11 @@ while (len(response) > 0): tag = response[0] control = (((((response[2]<<8) + response[3])<<8) + response[4])<<8) + response[5] - features.append([Features[tag], control]) + print tag, control + try: + features.append([Features[tag], control]) + except KeyError: + pass del response[:6] return features This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: Wim L. <wi...@hh...> - 2010-05-07 01:01:59
|
I've been working on getting pyscard to work with PIV cards (NIST SP 800-73, FIPS 201, that sort of thing). I have most of the command set working: logging in, key generation, signing, storing personalization data, etc. I'm posting this both in case there are other people who might be interested in this, and because I'd (eventually) like to get the PIV code I've written merged back into pyscard. Right now it's a bit messy since I didn't really know what I was doing when I started. Also, FWIW, pyscard is working fine on OS X 10.6/SnowLeopard, with minimal tweaks (eg removing ppc from the list of architectures to build). |
From: <lu...@us...> - 2010-04-29 14:59:33
|
Revision: 400 http://pyscard.svn.sourceforge.net/pyscard/?rev=400&view=rev Author: ludov Date: 2010-04-29 14:59:27 +0000 (Thu, 29 Apr 2010) Log Message: ----------- reformat to make pep8 happy Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/simple/getATR.py trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py Modified: trunk/pyscard/src/smartcard/Examples/simple/getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/simple/getATR.py 2010-04-29 13:57:24 UTC (rev 399) +++ trunk/pyscard/src/smartcard/Examples/simple/getATR.py 2010-04-29 14:59:27 UTC (rev 400) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -29,14 +31,13 @@ for reader in readers(): try: - connection=reader.createConnection() + connection = reader.createConnection() connection.connect() - print reader, toHexString( connection.getATR() ) + print reader, toHexString(connection.getATR()) except NoCardException: print reader, 'no card inserted' - import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2010-04-29 13:57:24 UTC (rev 399) +++ trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2010-04-29 14:59:27 UTC (rev 400) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -29,36 +31,34 @@ from smartcard.Exceptions import CardRequestTimeoutException # define the apdus used in this script -GET_RESPONSE = [0XA0, 0XC0, 00, 00 ] +GET_RESPONSE = [0XA0, 0XC0, 00, 00] SELECT = [0xA0, 0xA4, 0x00, 0x00, 0x02] DF_TELECOM = [0x7F, 0x10] - # request any card type cardtype = AnyCardType() try: # request card insertion print 'insert a card (SIM card if possible) within 10s' - cardrequest = CardRequest( timeout=10, cardType=cardtype ) + cardrequest = CardRequest(timeout=10, cardType=cardtype) cardservice = cardrequest.waitforcard() # attach the console tracer - observer=ConsoleCardConnectionObserver() - cardservice.connection.addObserver( observer ) + observer = ConsoleCardConnectionObserver() + cardservice.connection.addObserver(observer) - # connect to the card and perform a few transmits cardservice.connection.connect() - apdu = SELECT+DF_TELECOM - response, sw1, sw2 = cardservice.connection.transmit( apdu ) + apdu = SELECT + DF_TELECOM + response, sw1, sw2 = cardservice.connection.transmit(apdu) # there is a DF_TELECOM if sw1 == 0x9F: apdu = GET_RESPONSE + [sw2] - response, sw1, sw2 = cardservice.connection.transmit( apdu ) + response, sw1, sw2 = cardservice.connection.transmit(apdu) else: print 'no DF_TELECOM' @@ -70,8 +70,7 @@ import sys print sys.exc_info()[1] - import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-04-29 13:57:34
|
Revision: 399 http://pyscard.svn.sourceforge.net/pyscard/?rev=399&view=rev Author: ludov Date: 2010-04-29 13:57:24 +0000 (Thu, 29 Apr 2010) Log Message: ----------- fix whitespaces issues reported by pep8 Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/scard-api/sample_control.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_control.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_control.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_control.py 2010-04-29 13:57:24 UTC (rev 399) @@ -5,7 +5,7 @@ __author__ = "Ludovic Rousseau" -Copyright 2007 Ludovic Rousseau +Copyright 2007-2010 Ludovic Rousseau Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -29,18 +29,18 @@ from smartcard.util import toBytes try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - if len(readers)<1: + if len(readers) < 1: raise error, 'No smart card readers' for zreader in readers: @@ -49,33 +49,33 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( - hcontext, zreader, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_T0 ) - if hresult!=SCARD_S_SUCCESS: + hcontext, zreader, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_T0) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol try: - if 'winscard'==resourceManager: + if 'winscard' == resourceManager: # IOCTL_SMARTCARD_GET_ATTRIBUTE = SCARD_CTL_CODE(2) - hresult, response = SCardControl( hcard, SCARD_CTL_CODE(2), toBytes( "%.8lx" % SCARD_ATTR_VENDOR_NAME ) ) - if hresult!=SCARD_S_SUCCESS: + hresult, response = SCardControl(hcard, SCARD_CTL_CODE(2), toBytes("%.8lx" % SCARD_ATTR_VENDOR_NAME)) + if hresult != SCARD_S_SUCCESS: raise error, 'SCardControl failed: ' + SCardGetErrorMessage(hresult) r = "" for i in xrange(len(response)): r += "%c" % response[i] print 'SCARD_ATTR_VENDOR_NAME:', r - elif 'pcsclite'==resourceManager and not 'pcsclite-tiger'==resourceManagerSubType: + elif 'pcsclite' == resourceManager and not 'pcsclite-tiger' == resourceManagerSubType: # get firmware on Gemplus readers - hresult, response = SCardControl( hcard, SCARD_CTL_CODE(1), [ 0x02]) - if hresult!=SCARD_S_SUCCESS: + hresult, response = SCardControl(hcard, SCARD_CTL_CODE(1), [0x02]) + if hresult != SCARD_S_SUCCESS: raise error, 'SCardControl failed: ' + SCardGetErrorMessage(hresult) r = "" for i in xrange(len(response)): r += "%c" % response[i] print 'Control:', r finally: - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' @@ -83,8 +83,8 @@ print error, message finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -93,6 +93,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -28,16 +30,16 @@ import smartcard.util try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) - if len(readers)<1: + if len(readers) < 1: raise Exception('No smart card readers') print 'PCSC Readers:', readers @@ -45,16 +47,16 @@ print 'Trying to retreive ATR of card in', reader hresult, hcard, dwActiveProtocol = SCardConnect( - hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=SCARD_S_SUCCESS: + hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) + if hresult != SCARD_S_SUCCESS: print 'Unable to connect: ' + SCardGetErrorMessage(hresult) else: print 'Connected with active protocol', dwActiveProtocol try: - hresult, reader, state, protocol, atr = SCardStatus( hcard ) - if hresult!=SCARD_S_SUCCESS: + hresult, reader, state, protocol, atr = SCardStatus(hcard) + if hresult != SCARD_S_SUCCESS: print 'failed to get status: ' + SCardGetErrorMessage(hresult) print 'Reader:', reader print 'State:', state @@ -62,15 +64,15 @@ print 'ATR:', smartcard.util.toHexString(atr, smartcard.util.HEX) finally: - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: print 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -79,6 +81,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -32,84 +34,82 @@ attributes = {} else: attributes = { - SCARD_ATTR_ATR_STRING : 'SCARD_ATTR_ATR_STRING' , - SCARD_ATTR_CHANNEL_ID : 'SCARD_ATTR_CHANNEL_ID' , - SCARD_ATTR_CHARACTERISTICS : 'SCARD_ATTR_CHARACTERISTICS' , - SCARD_ATTR_CURRENT_BWT : 'SCARD_ATTR_CURRENT_BWT' , - SCARD_ATTR_CURRENT_CLK : 'SCARD_ATTR_CURRENT_CLK' , - SCARD_ATTR_CURRENT_CWT : 'SCARD_ATTR_CURRENT_CWT' , - SCARD_ATTR_CURRENT_D : 'SCARD_ATTR_CURRENT_D' , - SCARD_ATTR_CURRENT_EBC_ENCODING : 'SCARD_ATTR_CURRENT_EBC_ENCODING' , - SCARD_ATTR_CURRENT_F : 'SCARD_ATTR_CURRENT_F' , - SCARD_ATTR_CURRENT_IFSC : 'SCARD_ATTR_CURRENT_IFSC' , - SCARD_ATTR_CURRENT_IFSD : 'SCARD_ATTR_CURRENT_IFSD' , - SCARD_ATTR_CURRENT_IO_STATE : 'SCARD_ATTR_CURRENT_IO_STATE' , - SCARD_ATTR_CURRENT_N : 'SCARD_ATTR_CURRENT_N' , - SCARD_ATTR_CURRENT_PROTOCOL_TYPE : 'SCARD_ATTR_CURRENT_PROTOCOL_TYPE' , - SCARD_ATTR_CURRENT_W : 'SCARD_ATTR_CURRENT_W' , - SCARD_ATTR_DEFAULT_CLK : 'SCARD_ATTR_DEFAULT_CLK' , - SCARD_ATTR_DEFAULT_DATA_RATE : 'SCARD_ATTR_DEFAULT_DATA_RATE' , - SCARD_ATTR_DEVICE_FRIENDLY_NAME_A : 'SCARD_ATTR_DEVICE_FRIENDLY_NAME_A' , - SCARD_ATTR_DEVICE_FRIENDLY_NAME_W : 'SCARD_ATTR_DEVICE_FRIENDLY_NAME_W' , - SCARD_ATTR_DEVICE_IN_USE : 'SCARD_ATTR_DEVICE_IN_USE' , - SCARD_ATTR_DEVICE_SYSTEM_NAME_A : 'SCARD_ATTR_DEVICE_SYSTEM_NAME_A' , - SCARD_ATTR_DEVICE_SYSTEM_NAME_W : 'SCARD_ATTR_DEVICE_SYSTEM_NAME_W' , - SCARD_ATTR_DEVICE_UNIT : 'SCARD_ATTR_DEVICE_UNIT' , - SCARD_ATTR_ESC_AUTHREQUEST : 'SCARD_ATTR_ESC_AUTHREQUEST' , - SCARD_ATTR_ESC_CANCEL : 'SCARD_ATTR_ESC_CANCEL' , - SCARD_ATTR_ESC_RESET : 'SCARD_ATTR_ESC_RESET' , - SCARD_ATTR_EXTENDED_BWT : 'SCARD_ATTR_EXTENDED_BWT' , - SCARD_ATTR_ICC_INTERFACE_STATUS : 'SCARD_ATTR_ICC_INTERFACE_STATUS' , - SCARD_ATTR_ICC_PRESENCE : 'SCARD_ATTR_ICC_PRESENCE' , - SCARD_ATTR_ICC_TYPE_PER_ATR : 'SCARD_ATTR_ICC_TYPE_PER_ATR' , - SCARD_ATTR_MAXINPUT : 'SCARD_ATTR_MAXINPUT' , - SCARD_ATTR_MAX_CLK : 'SCARD_ATTR_MAX_CLK' , - SCARD_ATTR_MAX_DATA_RATE : 'SCARD_ATTR_MAX_DATA_RATE' , - SCARD_ATTR_MAX_IFSD : 'SCARD_ATTR_MAX_IFSD' , - SCARD_ATTR_POWER_MGMT_SUPPORT : 'SCARD_ATTR_POWER_MGMT_SUPPORT' , - SCARD_ATTR_SUPRESS_T1_IFS_REQUEST : 'SCARD_ATTR_SUPRESS_T1_IFS_REQUEST' , - SCARD_ATTR_USER_AUTH_INPUT_DEVICE : 'SCARD_ATTR_USER_AUTH_INPUT_DEVICE' , - SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE : 'SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE' , - SCARD_ATTR_VENDOR_IFD_SERIAL_NO : 'SCARD_ATTR_VENDOR_IFD_SERIAL_NO' , - SCARD_ATTR_VENDOR_IFD_TYPE : 'SCARD_ATTR_VENDOR_IFD_TYPE' , - SCARD_ATTR_VENDOR_IFD_VERSION : 'SCARD_ATTR_VENDOR_IFD_VERSION' , - SCARD_ATTR_VENDOR_NAME : 'SCARD_ATTR_VENDOR_NAME' - } - if 'pcsclite'==resourceManager: + SCARD_ATTR_ATR_STRING: 'SCARD_ATTR_ATR_STRING', + SCARD_ATTR_CHANNEL_ID: 'SCARD_ATTR_CHANNEL_ID', + SCARD_ATTR_CHARACTERISTICS: 'SCARD_ATTR_CHARACTERISTICS', + SCARD_ATTR_CURRENT_BWT: 'SCARD_ATTR_CURRENT_BWT', + SCARD_ATTR_CURRENT_CLK: 'SCARD_ATTR_CURRENT_CLK', + SCARD_ATTR_CURRENT_CWT: 'SCARD_ATTR_CURRENT_CWT', + SCARD_ATTR_CURRENT_D: 'SCARD_ATTR_CURRENT_D', + SCARD_ATTR_CURRENT_EBC_ENCODING: 'SCARD_ATTR_CURRENT_EBC_ENCODING', + SCARD_ATTR_CURRENT_F: 'SCARD_ATTR_CURRENT_F', + SCARD_ATTR_CURRENT_IFSC: 'SCARD_ATTR_CURRENT_IFSC', + SCARD_ATTR_CURRENT_IFSD: 'SCARD_ATTR_CURRENT_IFSD', + SCARD_ATTR_CURRENT_IO_STATE: 'SCARD_ATTR_CURRENT_IO_STATE', + SCARD_ATTR_CURRENT_N: 'SCARD_ATTR_CURRENT_N', + SCARD_ATTR_CURRENT_PROTOCOL_TYPE: 'SCARD_ATTR_CURRENT_PROTOCOL_TYPE', + SCARD_ATTR_CURRENT_W: 'SCARD_ATTR_CURRENT_W', + SCARD_ATTR_DEFAULT_CLK: 'SCARD_ATTR_DEFAULT_CLK', + SCARD_ATTR_DEFAULT_DATA_RATE: 'SCARD_ATTR_DEFAULT_DATA_RATE', + SCARD_ATTR_DEVICE_FRIENDLY_NAME_A: 'SCARD_ATTR_DEVICE_FRIENDLY_NAME_A', + SCARD_ATTR_DEVICE_FRIENDLY_NAME_W: 'SCARD_ATTR_DEVICE_FRIENDLY_NAME_W', + SCARD_ATTR_DEVICE_IN_USE: 'SCARD_ATTR_DEVICE_IN_USE', + SCARD_ATTR_DEVICE_SYSTEM_NAME_A: 'SCARD_ATTR_DEVICE_SYSTEM_NAME_A', + SCARD_ATTR_DEVICE_SYSTEM_NAME_W: 'SCARD_ATTR_DEVICE_SYSTEM_NAME_W', + SCARD_ATTR_DEVICE_UNIT: 'SCARD_ATTR_DEVICE_UNIT', + SCARD_ATTR_ESC_AUTHREQUEST: 'SCARD_ATTR_ESC_AUTHREQUEST', + SCARD_ATTR_ESC_CANCEL: 'SCARD_ATTR_ESC_CANCEL', + SCARD_ATTR_ESC_RESET: 'SCARD_ATTR_ESC_RESET', + SCARD_ATTR_EXTENDED_BWT: 'SCARD_ATTR_EXTENDED_BWT', + SCARD_ATTR_ICC_INTERFACE_STATUS: 'SCARD_ATTR_ICC_INTERFACE_STATUS', + SCARD_ATTR_ICC_PRESENCE: 'SCARD_ATTR_ICC_PRESENCE', + SCARD_ATTR_ICC_TYPE_PER_ATR: 'SCARD_ATTR_ICC_TYPE_PER_ATR', + SCARD_ATTR_MAXINPUT: 'SCARD_ATTR_MAXINPUT', + SCARD_ATTR_MAX_CLK: 'SCARD_ATTR_MAX_CLK', + SCARD_ATTR_MAX_DATA_RATE: 'SCARD_ATTR_MAX_DATA_RATE', + SCARD_ATTR_MAX_IFSD: 'SCARD_ATTR_MAX_IFSD', + SCARD_ATTR_POWER_MGMT_SUPPORT: 'SCARD_ATTR_POWER_MGMT_SUPPORT', + SCARD_ATTR_SUPRESS_T1_IFS_REQUEST: 'SCARD_ATTR_SUPRESS_T1_IFS_REQUEST', + SCARD_ATTR_USER_AUTH_INPUT_DEVICE: 'SCARD_ATTR_USER_AUTH_INPUT_DEVICE', + SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE: 'SCARD_ATTR_USER_TO_CARD_AUTH_DEVICE', + SCARD_ATTR_VENDOR_IFD_SERIAL_NO: 'SCARD_ATTR_VENDOR_IFD_SERIAL_NO', + SCARD_ATTR_VENDOR_IFD_TYPE: 'SCARD_ATTR_VENDOR_IFD_TYPE', + SCARD_ATTR_VENDOR_IFD_VERSION: 'SCARD_ATTR_VENDOR_IFD_VERSION', + SCARD_ATTR_VENDOR_NAME: 'SCARD_ATTR_VENDOR_NAME'} + if 'pcsclite' == resourceManager: extra_attributes = { - SCARD_ATTR_ASYNC_PROTOCOL_TYPES : 'SCARD_ATTR_ASYNC_PROTOCOL_TYPES', - SCARD_ATTR_SYNC_PROTOCOL_TYPES : 'SCARD_ATTR_SYNC_PROTOCOL_TYPES', - } + SCARD_ATTR_ASYNC_PROTOCOL_TYPES: 'SCARD_ATTR_ASYNC_PROTOCOL_TYPES', + SCARD_ATTR_SYNC_PROTOCOL_TYPES: 'SCARD_ATTR_SYNC_PROTOCOL_TYPES'} attributes.update(extra_attributes) -def printAttribute( attrib, value ): +def printAttribute(attrib, value): print '-----------------', attributes[attrib], '-----------------' print value print smartcard.util.toHexString(value, smartcard.util.HEX) - print apply( struct.pack, [ '<' + 'B' * len(value)] + value ) + print apply(struct.pack, ['<' + 'B' * len(value)] + value) try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Faile to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - if len(readers)<1: + if len(readers) < 1: raise error, 'No smart card readers' print 'Trying to retreive attributes of', readers[0] for reader in readers: hresult, hcard, dwActiveProtocol = SCardConnect( - hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=SCARD_S_SUCCESS: + hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) + if hresult != SCARD_S_SUCCESS: print error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) else: @@ -117,22 +117,22 @@ try: for i in attributes.keys(): - hresult, attrib = SCardGetAttrib( hcard, i ) - if hresult==SCARD_S_SUCCESS: - printAttribute( i, attrib ) + hresult, attrib = SCardGetAttrib(hcard, i) + if hresult == SCARD_S_SUCCESS: + printAttribute(i, attrib) else: print '-----------------', attributes[i], '-----------------' print 'unsupported' finally: - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -141,6 +141,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -28,8 +30,9 @@ import smartcard.util srTreeATR = [0x3B, 0x77, 0x94, 0x00, 0x00, 0x82, 0x30, 0x00, 0x13, 0x6C, 0x9F, 0x22] -srTreeMask= [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] +srTreeMask = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] + def printstate(state): reader, eventstate, atr = state print reader + " " + smartcard.util.toHexString(atr, smartcard.util.HEX) @@ -58,42 +61,42 @@ try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers readerstates = [] for i in xrange(len(readers)): - readerstates += [ (readers[i], SCARD_STATE_UNAWARE ) ] + readerstates += [(readers[i], SCARD_STATE_UNAWARE)] print '----- Current reader and card states are: -------' - hresult, newstates = SCardGetStatusChange( hcontext, 0, readerstates ) + hresult, newstates = SCardGetStatusChange(hcontext, 0, readerstates) for i in newstates: - printstate( i ) + printstate(i) print '----- Please insert or remove a card ------------' - hresult, newstates = SCardGetStatusChange( hcontext, INFINITE, newstates ) + hresult, newstates = SCardGetStatusChange(hcontext, INFINITE, newstates) print '----- New reader and card states are: -----------' for i in newstates: - printstate( i ) + printstate(i) finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' import sys - if 'win32'==sys.platform: + if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -26,39 +28,39 @@ from smartcard.scard import * -if 'winscard'==resourceManager: +if 'winscard' == resourceManager: # Cryptoflex 8k v2 is introduced in standard Windows 2000 - slbCryptoFlex8kv2ATR = [ 0x3B, 0x95, 0x15, 0x40, 0x00, 0x68, 0x01, 0x02, 0x00, 0x00 ] + slbCryptoFlex8kv2ATR = [0x3B, 0x95, 0x15, 0x40, 0x00, 0x68, 0x01, 0x02, 0x00, 0x00] try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, card = SCardListCards( hcontext, slbCryptoFlex8kv2ATR, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, card = SCardListCards(hcontext, slbCryptoFlex8kv2ATR, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failure to locate Schlumberger Cryptoflex 8k v2 card: ' + SCardGetErrorMessage(hresult) print 'Located by ATR:', card - hresult, cards = SCardListCards( hcontext, [], [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, cards = SCardListCards(hcontext, [], []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failure to list cards: ' + SCardGetErrorMessage(hresult) print 'Cards:', cards for i in cards: hresult, providerguid = SCardGetCardTypeProviderName( - hcontext, i, SCARD_PROVIDER_PRIMARY ) - if hresult==SCARD_S_SUCCESS: + hcontext, i, SCARD_PROVIDER_PRIMARY) + if hresult == SCARD_S_SUCCESS: print i, 'Primary provider:', providername hresult, providername = SCardGetCardTypeProviderName( - hcontext, i, SCARD_PROVIDER_CSP ) - if hresult==SCARD_S_SUCCESS: + hcontext, i, SCARD_PROVIDER_CSP) + if hresult == SCARD_S_SUCCESS: print i, 'CSP Provider:', providername finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -66,11 +68,11 @@ import sys print sys.exc_info()[0], ':', sys.exc_info()[1] -elif 'pcsclite'==resourceManager: +elif 'pcsclite' == resourceManager: print 'SCardListCards not supported by pcsc lite' import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -27,53 +29,53 @@ from smartcard.scard import * import smartcard.guid -if 'winscard'==resourceManager: +if 'winscard' == resourceManager: znewcardName = 'dummy-card' znewcardATR = [0x3B, 0x77, 0x94, 0x00, 0x00, 0x82, 0x30, 0x00, 0x13, 0x6C, 0x9F, 0x22] - znewcardMask= [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] + znewcardMask = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] znewcardPrimGuid = smartcard.guid.strToGUID('{128F3806-4F70-4ccf-977A-60C390664840}') znewcardSecGuid = smartcard.guid.strToGUID('{EB7F69EA-BA20-47d0-8C50-11CFDEB63BBE}') try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise scard.error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: # list interfaces for a known card - hresult, interfaces = SCardListInterfaces( hcontext, 'Schlumberger Cryptoflex 8k v2' ) - if hresult!=SCARD_S_SUCCESS: + hresult, interfaces = SCardListInterfaces(hcontext, 'Schlumberger Cryptoflex 8k v2') + if hresult != SCARD_S_SUCCESS: raise scard.error, 'Failed to list interfaces: ' + SCardGetErrorMessage(hresult) print 'Interfaces for Schlumberger Cryptoflex 8k v2:', interfaces # introduce a card (forget first in case it is already present) - hresult = SCardForgetCardType( hcontext, znewcardName ) + hresult = SCardForgetCardType(hcontext, znewcardName) print 'Introducing card ' + znewcardName - hresult = SCardIntroduceCardType( hcontext, znewcardName, znewcardPrimGuid, - znewcardPrimGuid + znewcardSecGuid, znewcardATR, znewcardMask ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardIntroduceCardType(hcontext, znewcardName, znewcardPrimGuid, + znewcardPrimGuid + znewcardSecGuid, znewcardATR, znewcardMask) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to introduce card type: ' + SCardGetErrorMessage(hresult) # list card interfaces - hresult, interfaces = SCardListInterfaces( hcontext, znewcardName ) - if hresult!=SCARD_S_SUCCESS: + hresult, interfaces = SCardListInterfaces(hcontext, znewcardName) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list interfaces: ' + SCardGetErrorMessage(hresult) for i in interfaces: print 'Interface for ' + znewcardName + ' :', smartcard.guid.GUIDToStr(i) print 'Forgeting card ' + znewcardName - hresult = SCardForgetCardType( hcontext, znewcardName ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardForgetCardType(hcontext, znewcardName) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to remove card type: ' + SCardGetErrorMessage(hresult) finally: - hresult2 = SCardReleaseContext( hcontext ) - if hresult2!=SCARD_S_SUCCESS: + hresult2 = SCardReleaseContext(hcontext) + if hresult2 != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -81,11 +83,11 @@ import sys print sys.exc_info()[0], ':', sys.exc_info()[1] -elif 'pcsclite'==resourceManager: +elif 'pcsclite' == resourceManager: print 'SCardListInterfaces not supported by pcsc lite' import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -26,47 +28,47 @@ from smartcard.scard import * -if 'winscard'==resourceManager: +if 'winscard' == resourceManager: znewcardName = 'dummy-card' znewcardATR = [0x3B, 0x77, 0x94, 0x00, 0x00, 0x82, 0x30, 0x00, 0x13, 0x6C, 0x9F, 0x22] - znewcardMask= [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] + znewcardMask = [0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF, 0xFF] try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise scard.error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise scard.error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers # introduce a card (forget first in case it is already present) - hresult = SCardForgetCardType( hcontext, znewcardName ) + hresult = SCardForgetCardType(hcontext, znewcardName) print 'Introducing card ' + znewcardName - hresult = SCardIntroduceCardType( hcontext, znewcardName, [], - [], znewcardATR, znewcardMask ) - if hresult!=SCARD_S_SUCCESS: - if hresult==ERROR_ALREADY_EXISTS: + hresult = SCardIntroduceCardType(hcontext, znewcardName, [], + [], znewcardATR, znewcardMask) + if hresult != SCARD_S_SUCCESS: + if hresult == ERROR_ALREADY_EXISTS: print 'Card already exists' else: raise error, 'Failed to introduce card type: ' + SCardGetErrorMessage(hresult) - hresult, cards = SCardListCards( hcontext, [], [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, cards = SCardListCards(hcontext, [], []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failure to list cards' print 'Cards:', cards readerstates = [] for i in xrange(len(readers)): - readerstates += [ (readers[i], SCARD_STATE_UNAWARE ) ] + readerstates += [(readers[i], SCARD_STATE_UNAWARE)] print readerstates - hresult, newstates = SCardLocateCards( hcontext, cards, readerstates ) + hresult, newstates = SCardLocateCards(hcontext, cards, readerstates) for i in newstates: reader, eventstate, atr = i print reader, @@ -97,9 +99,9 @@ print 'State unknowned' finally: - hresult = SCardForgetCardType( hcontext, znewcardName ) - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardForgetCardType(hcontext, znewcardName) + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -107,11 +109,11 @@ import sys print sys.exc_info()[0], ':', sys.exc_info()[1] -elif 'pcsclite'==resourceManager: +elif 'pcsclite' == resourceManager: print 'SCardLocateCards not supported by pcsc lite' import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-29 13:57:24 UTC (rev 399) @@ -5,7 +5,7 @@ __author__ = "Ludovic Rousseau" -Copyright 2009 Ludovic Rousseau +Copyright 2009-2010 Ludovic Rousseau Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -28,50 +28,54 @@ from smartcard.scard import * from smartcard.util import toASCIIBytes + def can_do_verify_pin(hCard): FEATURE_VERIFY_PIN_DIRECT = 6 return parse_get_feature_request(hCard, FEATURE_VERIFY_PIN_DIRECT) + def can_do_modify_pin(hCard): FEATURE_MODIFY_PIN_DIRECT = 7 return parse_get_feature_request(hCard, FEATURE_MODIFY_PIN_DIRECT) + def parse_get_feature_request(hCard, feature): # check the reader can do a verify pin CM_IOCTL_GET_FEATURE_REQUEST = SCARD_CTL_CODE(3400) hresult, response = SCardControl(hcard, CM_IOCTL_GET_FEATURE_REQUEST, []) - if hresult!=SCARD_S_SUCCESS: + if hresult != SCARD_S_SUCCESS: raise error, 'SCardControl failed: ' + SCardGetErrorMessage(hresult) print response while (len(response) > 0): tag = response[0] if (feature == tag): - return (((((response[2]<<8) + response[3])<<8) + response[4])<<8) + response[5] + return (((((response[2] << 8) + response[3]) << 8) + response[4]) << 8) + response[5] response = response[6:] + def verifypin(hCard, control=None): - if None==control: + if None == control: control = can_do_verify_pin(hCard) if (None == control): raise error, "Not a pinpad" hresult, response = SCardControl(hcard, control, []) - if hresult!=SCARD_S_SUCCESS: + if hresult != SCARD_S_SUCCESS: raise error, 'SCardControl failed: ' + SCardGetErrorMessage(hresult) return hresult, response try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - if len(readers)<1: + if len(readers) < 1: raise error, 'No smart card readers' for zreader in readers: @@ -81,7 +85,7 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) - if hresult!=SCARD_S_SUCCESS: + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol @@ -100,8 +104,8 @@ r += "%c" % response[i] print 'Control:', r finally: - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' @@ -109,8 +113,8 @@ print error, message finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -119,6 +123,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -29,89 +31,89 @@ newgroup = 'MyReaderGroup' try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers in all groups:', readers - hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult, readerGroups = SCardListReaderGroups(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to list reader groups: ' + SCardGetErrorMessage(hresult) print 'PCSC Reader groups:', readerGroups - if 'winscard'==resourceManager: + if 'winscard' == resourceManager: - hresult = SCardIntroduceReaderGroup( hcontext, newgroup ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardIntroduceReaderGroup(hcontext, newgroup) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to introduce reader group: ' + SCardGetErrorMessage(hresult) dummyreader = readers[0] + ' dummy' - hresult = SCardIntroduceReader( hcontext, dummyreader, readers[0] ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardIntroduceReader(hcontext, dummyreader, readers[0]) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to introduce reader: ' + dummyreader + ' : ' + SCardGetErrorMessage(hresult) - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers in all groups:', readers - hresult = SCardAddReaderToGroup( hcontext, dummyreader, newgroup ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardAddReaderToGroup(hcontext, dummyreader, newgroup) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to add reader to group: ' + SCardGetErrorMessage(hresult) - hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult, readerGroups = SCardListReaderGroups(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to list reader groups: ' + SCardGetErrorMessage(hresult) print 'PCSC Reader groups:', readerGroups - hresult, readers = SCardListReaders( hcontext, [newgroup] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, [newgroup]) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers in group ' + newgroup + ' : ' + SCardGetErrorMessage(hresult) print 'PCSC Readers in reader group', newgroup, ':', readers - hresult = SCardRemoveReaderFromGroup( hcontext, dummyreader, newgroup ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardRemoveReaderFromGroup(hcontext, dummyreader, newgroup) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to remove reader from group: ' + SCardGetErrorMessage(hresult) - hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult, readerGroups = SCardListReaderGroups(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to list reader groups: ' + SCardGetErrorMessage(hresult) print 'PCSC Reader groups:', readerGroups - hresult = SCardForgetReaderGroup( hcontext, newgroup ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardForgetReaderGroup(hcontext, newgroup) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to forget reader group: ' + SCardGetErrorMessage(hresult) - hresult = SCardForgetReader( hcontext, dummyreader ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardForgetReader(hcontext, dummyreader) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to forget readers ' + SCardGetErrorMessage(hresult) - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers in all groups:', readers - elif 'pcsclite'==resourceManager: - hresult, readers = SCardListReaders( hcontext, readerGroups ) - if hresult!=SCARD_S_SUCCESS: - raise error, 'Failed to list readers in groups '+ `readerGroups` + ' : ' + SCardGetErrorMessage(hresult) + elif 'pcsclite' == resourceManager: + hresult, readers = SCardListReaders(hcontext, readerGroups) + if hresult != SCARD_S_SUCCESS: + raise error, 'Failed to list readers in groups ' + `readerGroups` + ' : ' + SCardGetErrorMessage(hresult) print 'PCSC Readers in reader group', readerGroups, ':', readers finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' import sys - if 'win32'==sys.platform: + if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -27,30 +29,30 @@ from smartcard.scard import * try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult, readerGroups = SCardListReaderGroups(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to list reader groups: ' + SCardGetErrorMessage(hresult) print 'PCSC Reader groups:', readerGroups finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' import sys - if 'win32'==sys.platform: + if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -32,18 +34,18 @@ GET_RESPONSE = [0xA0, 0xC0, 0x00, 0x00] try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context : ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - if len(readers)<1: + if len(readers) < 1: raise error, 'No smart card readers' for zreader in readers: @@ -52,23 +54,23 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( - hcontext, zreader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=SCARD_S_SUCCESS: + hcontext, zreader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) + if hresult != SCARD_S_SUCCESS: raise error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol try: - hresult, response = SCardTransmit( hcard, dwActiveProtocol, SELECT + DF_TELECOM ) - if hresult!=SCARD_S_SUCCESS: + hresult, response = SCardTransmit(hcard, dwActiveProtocol, SELECT + DF_TELECOM) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to transmit: ' + SCardGetErrorMessage(hresult) print 'Selected DF_TELECOM: ' + smartcard.util.toHexString(response, smartcard.util.HEX) - hresult, response = SCardTransmit( hcard, dwActiveProtocol, GET_RESPONSE + [response[1]] ) - if hresult!=SCARD_S_SUCCESS: + hresult, response = SCardTransmit(hcard, dwActiveProtocol, GET_RESPONSE + [response[1]]) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to transmit: ' + SCardGetErrorMessage(hresult) print 'GET_RESPONSE after SELECT DF_TELECOM: ' + smartcard.util.toHexString(response, smartcard.util.HEX) finally: - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' @@ -76,8 +78,8 @@ print error, message finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -86,6 +88,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-04-21 14:33:55 UTC (rev 398) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-04-29 13:57:24 UTC (rev 399) @@ -6,6 +6,8 @@ Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... +Copyright 2010 Ludovic Rousseau +Author: Ludovic Rousseau, mailto:lud...@fr... This file is part of pyscard. @@ -26,20 +28,19 @@ from smartcard.scard import * - try: - hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=SCARD_S_SUCCESS: + hresult, hcontext = SCardEstablishContext(SCARD_SCOPE_USER) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: - hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=SCARD_S_SUCCESS: + hresult, readers = SCardListReaders(hcontext, []) + if hresult != SCARD_S_SUCCESS: raise error, 'Failed to list readers:: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers - if len(readers)<1: + if len(readers) < 1: raise error, 'No smart card readers' for zreader in readers: @@ -48,18 +49,18 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) - if hresult!=SCARD_S_SUCCESS: + if hresult != SCARD_S_SUCCESS: raise error, 'unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol try: - hresult = SCardBeginTransaction( hcard ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardBeginTransaction(hcard) + if hresult != SCARD_S_SUCCESS: raise error, 'failed to begin transaction: ' + SCardGetErrorMessage(hresult) print 'Beginning transaction' - hresult, reader, state, protocol, atr = SCardStatus( hcard ) - if hresult!=SCARD_S_SUCCESS: + hresult, reader, state, protocol, atr = SCardStatus(hcard) + if hresult != SCARD_S_SUCCESS: raise error, 'failed to get status: ' + SCardGetErrorMessage(hresult) print 'ATR:', for i in xrange(len(atr)): @@ -67,21 +68,21 @@ print "" finally: - hresult = SCardEndTransaction( hcard, SCARD_LEAVE_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardEndTransaction(hcard, SCARD_LEAVE_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'failed to end transaction: ' + SCardGetErrorMessage(hresult) print 'Transaction ended' - hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardDisconnect(hcard, SCARD_UNPOWER_CARD) + if hresult != SCARD_S_SUCCESS: raise error, 'failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' except error, (message): print error, message finally: - hresult = SCardReleaseContext( hcontext ) - if hresult!=SCARD_S_SUCCESS: + hresult = SCardReleaseContext(hcontext) + if hresult != SCARD_S_SUCCESS: raise error, 'failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' @@ -90,6 +91,6 @@ print sys.exc_info()[0], ':', sys.exc_info()[1] import sys -if 'win32'==sys.platform: +if 'win32' == sys.platform: print 'press Enter to continue' sys.stdin.read(1) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-21 14:34:04
|
Revision: 398 http://pyscard.svn.sourceforge.net/pyscard/?rev=398&view=rev Author: jdaussel Date: 2010-04-21 14:33:55 +0000 (Wed, 21 Apr 2010) Log Message: ----------- Propagate disposition parameter to CardConnection and CardConnectionDecorators Modified Paths: -------------- trunk/pyscard/src/smartcard/CardConnection.py trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py Modified: trunk/pyscard/src/smartcard/CardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnection.py 2010-04-20 19:21:09 UTC (rev 397) +++ trunk/pyscard/src/smartcard/CardConnection.py 2010-04-21 14:33:55 UTC (rev 398) @@ -70,7 +70,7 @@ """Remove a CardConnection observer.""" Observable.deleteObserver( self, observer ) - def connect( self, protocol=None, mode=None ): + def connect( self, protocol=None, mode=None, disposition=None ): """Connect to card. protocol: a bit mask of the protocols to use, from CardConnection.T0_protocol, CardConnection.T1_protocol, CardConnection.RAW_protocol, CardConnection.T15_protocol Modified: trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py 2010-04-20 19:21:09 UTC (rev 397) +++ trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py 2010-04-21 14:33:55 UTC (rev 398) @@ -35,9 +35,9 @@ def __init__( self, cardconnection ): CardConnectionDecorator.__init__( self, cardconnection ) - def connect( self, protocol=None, mode=None ): + def connect( self, protocol=None, mode=None, disposition=None ): '''Disconnect and reconnect in exclusive mode PCSCCardconnections.''' - CardConnectionDecorator.connect( self, protocol, mode ) + CardConnectionDecorator.connect( self, protocol, mode, disposition ) component=self.component while True: if isinstance( component, smartcard.pcsc.PCSCCardConnection.PCSCCardConnection ): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-04-20 19:21:15
|
Revision: 397 http://pyscard.svn.sourceforge.net/pyscard/?rev=397&view=rev Author: ludov Date: 2010-04-20 19:21:09 +0000 (Tue, 20 Apr 2010) Log Message: ----------- fix typo in can_do_verify_pin Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-20 15:45:17 UTC (rev 396) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-20 19:21:09 UTC (rev 397) @@ -51,7 +51,7 @@ def verifypin(hCard, control=None): if None==control: - control = can_do_verify_ypin(hCard) + control = can_do_verify_pin(hCard) if (None == control): raise error, "Not a pinpad" hresult, response = SCardControl(hcard, control, []) @@ -86,7 +86,7 @@ print 'Connected with active protocol', dwActiveProtocol try: - cmd_verify = can_do_verif_ypin(hcard) + cmd_verify = can_do_verify_pin(hcard) if (cmd_verify): print "can do verify pin: 0x%08X" % cmd_verify This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-20 15:45:26
|
Revision: 396 http://pyscard.svn.sourceforge.net/pyscard/?rev=396&view=rev Author: jdaussel Date: 2010-04-20 15:45:17 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Moved handling of ScardGetStatusChange() in python layer Modified Paths: -------------- trunk/pyscard/src/smartcard/ChangeLog trunk/pyscard/src/smartcard/scard/scard.i Modified: trunk/pyscard/src/smartcard/ChangeLog =================================================================== --- trunk/pyscard/src/smartcard/ChangeLog 2010-04-20 15:39:27 UTC (rev 395) +++ trunk/pyscard/src/smartcard/ChangeLog 2010-04-20 15:45:17 UTC (rev 396) @@ -9,8 +9,12 @@ * rename FEATURE_MCT_READERDIRECT in FEATURE_MCT_READER_DIRECT to be conform with PCSC v2 part 10 ch. 2.3 (Ludovic Rousseau) * added missing CARD_E_NO_READERS_AVAILABLE (Kjell Tore Fossbakk) * added support of x86_64 on Mac OS X Snow Leopard (Jakob Schlyter) + * ATR can be passed in input in the reader state list (Benoit Allard) + * clear state changed bit in waitforcard/waitforcardevent upon time-out or reader removal (Jean-Daniel Aussel) + * removed clearing of states and ATR content upon SCardGetStatusChange() error (Benoit Allard); handling is now moved up in python framework (Jean-Daniel Aussel) + 1.6.8 (July 2009) ================= * fixed SCARD_ERROR types to match correct types on linux and Mac OS X (Ludovic Rousseau) Modified: trunk/pyscard/src/smartcard/scard/scard.i =================================================================== --- trunk/pyscard/src/smartcard/scard/scard.i 2010-04-20 15:39:27 UTC (rev 395) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-04-20 15:45:17 UTC (rev 396) @@ -558,21 +558,6 @@ // printf( "%.8lx %.8lx ", prsl->ars[i].dwCurrentState, prsl->ars[i].dwEventState ); //} - // there was a time-out or we asked for an unexisting reader - // in this case, the output values of the READERSTATELIST are meaningless - if( SCARD_E_TIMEOUT==hresult || SCARD_E_UNKNOWN_READER==hresult) - { - // for each state, output event state is input event state, and nuke ATR if no card present - for( i=0; i<prsl->cRStates; i++ ) - { - // remove changed bit - prsl->ars[i].dwEventState = prsl->ars[i].dwCurrentState; - - // ATR not valid on output - prsl->ars[i].cbAtr=0; - } - } - return hresult; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-20 15:39:36
|
Revision: 395 http://pyscard.svn.sourceforge.net/pyscard/?rev=395&view=rev Author: jdaussel Date: 2010-04-20 15:39:27 +0000 (Tue, 20 Apr 2010) Log Message: ----------- In case of time out or reader unplugged, reset state changed bit Modified Paths: -------------- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2010-04-20 15:32:39 UTC (rev 394) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2010-04-20 15:39:27 UTC (rev 395) @@ -137,7 +137,13 @@ if 0!=hresult and SCARD_E_TIMEOUT!=hresult and SCARD_E_UNKNOWN_READER!=hresult: raise CardRequestException( 'Failed to SCardGetStatusChange ' + SCardGetErrorMessage(hresult) ) - + # in case of timeout or reader disappearing, the content of the states is useless + # in which case we clear the changed bit + if SCARD_E_TIMEOUT==hresult or SCARD_E_UNKNOWN_READER==hresult: + for state in newstates: + state[1] = state[1] & (0xFFFFFFFF ^ SCARD_STATE_CHANGED) + + # update readerstate for state in newstates: readername, eventstate, atr = state This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-20 15:32:51
|
Revision: 394 http://pyscard.svn.sourceforge.net/pyscard/?rev=394&view=rev Author: jdaussel Date: 2010-04-20 15:32:39 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Added support for passing ATR in reader state list as input to ScardGetStatusChange() Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/helpers.c Modified: trunk/pyscard/src/smartcard/scard/helpers.c =================================================================== --- trunk/pyscard/src/smartcard/scard/helpers.c 2010-04-20 15:26:28 UTC (rev 393) +++ trunk/pyscard/src/smartcard/scard/helpers.c 2010-04-20 15:32:39 UTC (rev 394) @@ -105,6 +105,22 @@ o2=PyTuple_GetItem(o, 1); prl->ars[x].dwCurrentState = (SCARDDWORDARG)PyInt_AsLong(o2); + // third tuple item is the ATR (optionally) + if(PyTuple_Size(o)==3) + { + BYTELIST* ATR = mem_Malloc(sizeof(BYTELIST)); + if( !ATR ) + { + PyErr_SetString( PyExc_MemoryError, "Unable to allocate temporary array" ); + return 0; + } + o2 = PyTuple_GetItem(o, 2); + + ATR = SCardHelper_PyByteListToBYTELIST(o2); + memcpy(prl->ars[x].rgbAtr, ATR->ab, ATR->cBytes); + prl->ars[x].cbAtr = ATR->cBytes; + mem_Free(ATR); + } return 1; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-20 15:26:34
|
Revision: 393 http://pyscard.svn.sourceforge.net/pyscard/?rev=393&view=rev Author: jdaussel Date: 2010-04-20 15:26:28 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Fixed typo in can_do_verify_pin call Modified Paths: -------------- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-20 13:08:20 UTC (rev 392) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-04-20 15:26:28 UTC (rev 393) @@ -51,7 +51,7 @@ def verifypin(hCard, control=None): if None==control: - control = can_do_verif_ypin(hCard) + control = can_do_verify_ypin(hCard) if (None == control): raise error, "Not a pinpad" hresult, response = SCardControl(hcard, control, []) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <jda...@us...> - 2010-04-20 13:08:28
|
Revision: 392 http://pyscard.svn.sourceforge.net/pyscard/?rev=392&view=rev Author: jdaussel Date: 2010-04-20 13:08:20 +0000 (Tue, 20 Apr 2010) Log Message: ----------- Updated version to 1.6.10, copyrights extended to 2010, release date April 2010, and updated ChangeLog Modified Paths: -------------- trunk/pyscard/src/PKG-INFO trunk/pyscard/src/README trunk/pyscard/src/setup.py trunk/pyscard/src/smartcard/ATR.py trunk/pyscard/src/smartcard/AbstractCardRequest.py trunk/pyscard/src/smartcard/Card.py trunk/pyscard/src/smartcard/CardConnection.py trunk/pyscard/src/smartcard/CardConnectionDecorator.py trunk/pyscard/src/smartcard/CardConnectionEvent.py trunk/pyscard/src/smartcard/CardConnectionObserver.py trunk/pyscard/src/smartcard/CardMonitoring.py trunk/pyscard/src/smartcard/CardNames.py trunk/pyscard/src/smartcard/CardRequest.py trunk/pyscard/src/smartcard/CardService.py trunk/pyscard/src/smartcard/CardType.py trunk/pyscard/src/smartcard/ChangeLog trunk/pyscard/src/smartcard/Examples/framework/sample_CardConnectionDecorator.py trunk/pyscard/src/smartcard/Examples/framework/sample_ConsoleConnectionTracer.py trunk/pyscard/src/smartcard/Examples/framework/sample_CustomCardType.py trunk/pyscard/src/smartcard/Examples/framework/sample_CustomErrorChecker.py trunk/pyscard/src/smartcard/Examples/framework/sample_ErrorChecking.py trunk/pyscard/src/smartcard/Examples/framework/sample_ExclusiveCardConnection.py trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCards.py trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCardsAndTransmit.py trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorReaders.py trunk/pyscard/src/smartcard/Examples/framework/sample_TransmitCardObserver.py trunk/pyscard/src/smartcard/Examples/framework/sample_apduTracerInterpreter.py trunk/pyscard/src/smartcard/Examples/framework/sample_toHexString.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py trunk/pyscard/src/smartcard/Examples/simple/getATR.py trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py trunk/pyscard/src/smartcard/Examples/wx/apdumanager/SampleAPDUManagerPanel.py trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py trunk/pyscard/src/smartcard/Examples/wx/pcscdiag/pcscdiag.py trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py trunk/pyscard/src/smartcard/Exceptions.py trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py trunk/pyscard/src/smartcard/ExclusiveTransmitCardConnection.py trunk/pyscard/src/smartcard/PassThruCardService.py trunk/pyscard/src/smartcard/README trunk/pyscard/src/smartcard/ReaderMonitoring.py trunk/pyscard/src/smartcard/Session.py trunk/pyscard/src/smartcard/System.py trunk/pyscard/src/smartcard/TODO trunk/pyscard/src/smartcard/__init__.py trunk/pyscard/src/smartcard/doc/framework-samples.html trunk/pyscard/src/smartcard/doc/index.html trunk/pyscard/src/smartcard/doc/scard-samples.html trunk/pyscard/src/smartcard/guid.py trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py trunk/pyscard/src/smartcard/pcsc/PCSCContext.py trunk/pyscard/src/smartcard/pcsc/PCSCExceptions.py trunk/pyscard/src/smartcard/pcsc/PCSCReader.py trunk/pyscard/src/smartcard/pcsc/PCSCReaderGroups.py trunk/pyscard/src/smartcard/reader/Reader.py trunk/pyscard/src/smartcard/reader/ReaderFactory.py trunk/pyscard/src/smartcard/reader/ReaderGroups.py trunk/pyscard/src/smartcard/scard/PcscDefs.i trunk/pyscard/src/smartcard/scard/PcscTypemaps.i trunk/pyscard/src/smartcard/scard/gemalto.ver trunk/pyscard/src/smartcard/scard/helpers.c trunk/pyscard/src/smartcard/scard/helpers.h trunk/pyscard/src/smartcard/scard/makefile trunk/pyscard/src/smartcard/scard/memlog.h trunk/pyscard/src/smartcard/scard/pcsctypes.h trunk/pyscard/src/smartcard/scard/scard.i trunk/pyscard/src/smartcard/scard/winscarddll.c trunk/pyscard/src/smartcard/scard/winscarddll.h trunk/pyscard/src/smartcard/sw/ErrorChecker.py trunk/pyscard/src/smartcard/sw/ErrorCheckingChain.py trunk/pyscard/src/smartcard/sw/ISO7816_4ErrorChecker.py trunk/pyscard/src/smartcard/sw/ISO7816_4_SW1ErrorChecker.py trunk/pyscard/src/smartcard/sw/ISO7816_8ErrorChecker.py trunk/pyscard/src/smartcard/sw/ISO7816_9ErrorChecker.py trunk/pyscard/src/smartcard/sw/SWExceptions.py trunk/pyscard/src/smartcard/sw/__init__.py trunk/pyscard/src/smartcard/sw/op21_ErrorChecker.py trunk/pyscard/src/smartcard/test/configcheck.py trunk/pyscard/src/smartcard/test/framework/testcase_ATR.py trunk/pyscard/src/smartcard/test/framework/testcase_CAtr.py trunk/pyscard/src/smartcard/test/framework/testcase_Card.py trunk/pyscard/src/smartcard/test/framework/testcase_CardConnection.py trunk/pyscard/src/smartcard/test/framework/testcase_CardMonitor.py trunk/pyscard/src/smartcard/test/framework/testcase_CardRequest.py trunk/pyscard/src/smartcard/test/framework/testcase_CardService.py trunk/pyscard/src/smartcard/test/framework/testcase_CardType.py trunk/pyscard/src/smartcard/test/framework/testcase_ErrorChecking.py trunk/pyscard/src/smartcard/test/framework/testcase_ExclusiveCardConnection.py trunk/pyscard/src/smartcard/test/framework/testcase_readergroups.py trunk/pyscard/src/smartcard/test/framework/testcase_readermonitor.py trunk/pyscard/src/smartcard/test/framework/testcase_readermonitorstress.py trunk/pyscard/src/smartcard/test/framework/testcase_readers.py trunk/pyscard/src/smartcard/test/framework/testcase_ulist.py trunk/pyscard/src/smartcard/test/framework/testcase_utils.py trunk/pyscard/src/smartcard/test/framework/testsuite_framework.py trunk/pyscard/src/smartcard/test/frameworkpcsc/testcase_pcscreadergroups.py trunk/pyscard/src/smartcard/test/frameworkpcsc/testsuite_frameworkpcsc.py trunk/pyscard/src/smartcard/test/manual/testcase_manualCardRequest.py trunk/pyscard/src/smartcard/test/scard/testcase_getatr.py trunk/pyscard/src/smartcard/test/scard/testcase_getattrib.py trunk/pyscard/src/smartcard/test/scard/testcase_geterrormessage.py trunk/pyscard/src/smartcard/test/scard/testcase_listcards.py trunk/pyscard/src/smartcard/test/scard/testcase_locatecards.py trunk/pyscard/src/smartcard/test/scard/testcase_readergroups.py trunk/pyscard/src/smartcard/test/scard/testcase_transaction.py trunk/pyscard/src/smartcard/test/scard/testsuite_scard.py trunk/pyscard/src/smartcard/ulist.py trunk/pyscard/src/smartcard/util/__init__.py trunk/pyscard/src/smartcard/wx/APDUHexValidator.py trunk/pyscard/src/smartcard/wx/APDUTracerPanel.py trunk/pyscard/src/smartcard/wx/CardAndReaderTreePanel.py trunk/pyscard/src/smartcard/wx/ReaderToolbar.py trunk/pyscard/src/smartcard/wx/SimpleSCardApp.py trunk/pyscard/src/smartcard/wx/SimpleSCardAppEventObserver.py trunk/pyscard/src/smartcard/wx/SimpleSCardAppFrame.py trunk/pyscard/src/smartcard/wx/__init__.py trunk/pyscard/tools/commands/build-doc.py trunk/pyscard/tools/commands/uninstall.py Modified: trunk/pyscard/src/PKG-INFO =================================================================== --- trunk/pyscard/src/PKG-INFO 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/PKG-INFO 2010-04-20 13:08:20 UTC (rev 392) @@ -1,6 +1,6 @@ Metadata-Version: 1.0 Name: pyscard -Version: 1.6.8 +Version: 1.6.10 Summary: Smartcard module for Python. Home-page: http://pyscard.sourceforge.net/ Author: Jean-Daniel Aussel @@ -11,7 +11,7 @@ Platform: linux Platform: win32 Platform: Mac OSX -Classifier: Development Status :: 1.6.8 - Release +Classifier: Development Status :: 1.6.10 - Release Classifier: License :: GNU LESSER GENERAL PUBLIC LICENSE Classifier: Intended Audience :: Developers Classifier: Operating System :: Unix Modified: trunk/pyscard/src/README =================================================================== --- trunk/pyscard/src/README 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/README 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ http://pyscard.sourceforge.net/ ------------------------------------------------------------------------------- -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. @@ -23,7 +23,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ------------------------------------------------------------------------------- -Last update : pyscard 1.6.8 (July 2009) +Last update : pyscard 1.6.10 (April 2010) ------------------------------------------------------------------------------- pyscard is a python module adding smart cards support to python. @@ -61,7 +61,7 @@ The binary msi installer and self-executable installer are packaged for a specific version of python, and have name similar to -pyscard-1.6.8.win32-py2.5.msi and pyscard-1.6.8.win32-py2.5.exe for +pyscard-1.6.10.win32-py2.5.msi and pyscard-1.6.10.win32-py2.5.exe for python 2.5. @@ -77,8 +77,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip for windows, -and pyscard-1.6.8.tar.gz for linux. +The source distribution is available as pyscard-1.6.10.zip for windows, +and pyscard-1.6.10.tar.gz for linux. 3. unzip the source distribution, open a console and type the following: @@ -99,8 +99,8 @@ 1. download the binary distribution The binary distribution is either an archive file or a rpm file, with -names similar to pyscard-1.6.8-1.i386.rpm for the rpm distribution, -or pyscard-1.6.8.linux-i686.tar.gz for the archive distribution. +names similar to pyscard-1.6.10-1.i386.rpm for the rpm distribution, +or pyscard-1.6.10.linux-i686.tar.gz for the archive distribution. 2. untar the binary distribution @@ -115,8 +115,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar the source distribution @@ -130,7 +130,7 @@ Installation on Max OS X Tiger: -------------------------------- -The Mac OS X Tiger support is experimental on pyscard 1.6.8. It was developed +The Mac OS X Tiger support is experimental on pyscard 1.6.10. It was developed and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a ppc MacBook. @@ -140,14 +140,14 @@ 1. download the binary distribution The binary distribution is an archive file, with a name similar to -pyscard-1.6.8-py-2.3-macosx10.4.mpkg or pyscard-1.6.8-py-2.5-macosx10.4.mpkg. +pyscard-1.6.10-py-2.3-macosx10.4.mpkg or pyscard-1.6.10-py-2.5-macosx10.4.mpkg. 2. Open the package and proceed with installation. -Python 2.3 is pre-installed, so install pyscard-1.6.8-py-2.3-macosx10.4.mpkg if +Python 2.3 is pre-installed, so install pyscard-1.6.10-py-2.3-macosx10.4.mpkg if you did not install another release of python. -Install pyscard-1.6.8-py-2.5-macosx10.4.mpkg if you installed python 2.5. +Install pyscard-1.6.10-py-2.5-macosx10.4.mpkg if you installed python 2.5. Installing on Mac OS X Tiger from the source distribution ---------------------------------------------------------- @@ -157,8 +157,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar or unzip the source distribution @@ -173,7 +173,7 @@ Installation on Max OS X Leopard: --------------------------------- -The Mac OS X Leopard support is experimental on pyscard 1.6.8. It was developed +The Mac OS X Leopard support is experimental on pyscard 1.6.10. It was developed and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a ppc MacBook. @@ -183,7 +183,7 @@ 1. download the binary distribution The binary distribution is an archive file, with a name similar to -pyscard-1.6.8-py-2.5-macosx10.5.mpkg. +pyscard-1.6.10-py-2.5-macosx10.5.mpkg. 2. Open the package and proceed with installation. @@ -195,8 +195,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar or unzip the source distribution @@ -235,9 +235,9 @@ setup.py build_ext bdist_wininst This will build the msi installer and self-executable installer in the dist -directory, with names similar to pyscard-1.6.8.win32-py2.5.msi and -pyscard-1.6.8.win32-py2.5.exe for python 2.5, and -pyscard-1.6.8.win32-py2.4.msi and pyscard-1.6.8.win32-py2.4.exe for +directory, with names similar to pyscard-1.6.10.win32-py2.5.msi and +pyscard-1.6.10.win32-py2.5.exe for python 2.5, and +pyscard-1.6.10.win32-py2.4.msi and pyscard-1.6.10.win32-py2.4.exe for python 2.4. Building a binary distribution for linux @@ -252,7 +252,7 @@ /usr/bin/python setup.py build_ext bdist -This will build a package similar to pyscard-1.6.8.linux-i686.tar.gz +This will build a package similar to pyscard-1.6.10.linux-i686.tar.gz containing a tree Building a rpm distribution for linux @@ -274,7 +274,7 @@ echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros This will build in the dist directory a binary distribution with a name -similar to pyscard-1.6.8-1.i386.rpm. +similar to pyscard-1.6.10-1.i386.rpm. Building a binary distribution for Mac OS X Tiger ------------------------------------------------- @@ -291,7 +291,7 @@ python setup.py build_ext /System/Library/Frameworks/Python.Framework/Versions/2.3/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.3-macosx10.4.mpkg. +This will build package pyscard-1.6.10-py-2.3-macosx10.4.mpkg. If you are using python 2.5, in the root directory of the source distribution, i.e. in the src directory, execute the following commands in a terminal: @@ -299,7 +299,7 @@ python setup.py build_ext /Library/Frameworks/Python.Framework/Versions/2.5/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.6-macosx10.4.mpkg. +This will build package pyscard-1.6.10-py-2.6-macosx10.4.mpkg. Building a binary distribution for Mac OS X Leopard @@ -348,7 +348,7 @@ python setup.py build_ext /Library/Frameworks/Python.Framework/Versions/2.5/Extras/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.5-macosx10.5.mpkg. +This will build package pyscard-1.6.10-py-2.5-macosx10.5.mpkg. For python 2.6, from the root directory of the pyscard source distribution, i.e. in the src directory, execute the following commands in a terminal: @@ -356,7 +356,7 @@ python setup.py build_ext /Library/Frameworks/Python.framework/Versions/2.6/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.6-macosx10.5.mpkg. +This will build package pyscard-1.6.10-py-2.6-macosx10.5.mpkg. ------------------------------------------------------------------------------- Issue Tracking Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/setup.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. @@ -152,7 +152,7 @@ build_ext.swig_sources = swig_sources kw = {'name': "pyscard", - 'version': "1.6.8", + 'version': "1.6.10", 'description': "Smartcard module for Python.", 'author': "Jean-Daniel Aussel", 'author_email': "aus...@ge...", @@ -198,7 +198,7 @@ if hasattr(core, 'setup_keywords'): if 'classifiers' in core.setup_keywords: kw['classifiers'] = [ - 'Development Status :: 1.6.8 - Release', + 'Development Status :: 1.6.10 - Release', 'License :: GNU LESSER GENERAL PUBLIC LICENSE', 'Intended Audience :: Developers', 'Operating System :: Unix', Modified: trunk/pyscard/src/smartcard/ATR.py =================================================================== --- trunk/pyscard/src/smartcard/ATR.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/ATR.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/AbstractCardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/AbstractCardRequest.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/AbstractCardRequest.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Card.py =================================================================== --- trunk/pyscard/src/smartcard/Card.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Card.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "gemalto http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnection.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardConnection.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardConnectionDecorator.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardConnectionEvent.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnectionEvent.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardConnectionEvent.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardConnectionObserver.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnectionObserver.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardConnectionObserver.py 2010-04-20 13:08:20 UTC (rev 392) @@ -5,7 +5,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardMonitoring.py =================================================================== --- trunk/pyscard/src/smartcard/CardMonitoring.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardMonitoring.py 2010-04-20 13:08:20 UTC (rev 392) @@ -8,7 +8,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardNames.py =================================================================== --- trunk/pyscard/src/smartcard/CardNames.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardNames.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/CardRequest.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardRequest.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardService.py =================================================================== --- trunk/pyscard/src/smartcard/CardService.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardService.py 2010-04-20 13:08:20 UTC (rev 392) @@ -10,7 +10,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/CardType.py =================================================================== --- trunk/pyscard/src/smartcard/CardType.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/CardType.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/ChangeLog =================================================================== --- trunk/pyscard/src/smartcard/ChangeLog 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/ChangeLog 2010-04-20 13:08:20 UTC (rev 392) @@ -1,3 +1,16 @@ +1.6.10 (April 2010) +=================== + * connect() has a new disposition parameter that is passed to SCardDisconnect (Ludovic Rousseau) + * fixed winscard_init() bad initialization causing problems in multithreaded environment (Ludovic Rousseau) + * Use MAX_BUFFER_SIZE_EXTENDED (64k) instead of 1024 for SCardControl and SCardTransmit (Ludovic Rousseau, reported by Lukasz Drygiel) + * call winscard_init() to load the library only in the %init section instead of in each wrapped function (Ludovic Rousseau) + * for Snow Leopard, do not pass -framework PCSC to the compiler (Martin Paljak) + * reformatting to meet pep8 (Style Guide for Python Code) guidelines (Ludovic Rousseau) + * rename FEATURE_MCT_READERDIRECT in FEATURE_MCT_READER_DIRECT to be conform with PCSC v2 part 10 ch. 2.3 (Ludovic Rousseau) + * added missing CARD_E_NO_READERS_AVAILABLE (Kjell Tore Fossbakk) + * added support of x86_64 on Mac OS X Snow Leopard (Jakob Schlyter) + + 1.6.8 (July 2009) ================= * fixed SCARD_ERROR types to match correct types on linux and Mac OS X (Ludovic Rousseau) Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_CardConnectionDecorator.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_CardConnectionDecorator.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_CardConnectionDecorator.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_ConsoleConnectionTracer.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_ConsoleConnectionTracer.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_ConsoleConnectionTracer.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_CustomCardType.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_CustomCardType.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_CustomCardType.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_CustomErrorChecker.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_CustomErrorChecker.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_CustomErrorChecker.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_ErrorChecking.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_ErrorChecking.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_ErrorChecking.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_ExclusiveCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_ExclusiveCardConnection.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_ExclusiveCardConnection.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCards.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCards.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCardsAndTransmit.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCardsAndTransmit.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorCardsAndTransmit.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorReaders.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorReaders.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_MonitorReaders.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_TransmitCardObserver.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_TransmitCardObserver.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_TransmitCardObserver.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_apduTracerInterpreter.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_apduTracerInterpreter.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_apduTracerInterpreter.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_toHexString.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_toHexString.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_toHexString.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/simple/getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/simple/getATR.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/simple/getATR.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/simple/selectDF_TELECOM.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/wx/apdumanager/SampleAPDUManagerPanel.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/apdumanager/SampleAPDUManagerPanel.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/wx/apdumanager/SampleAPDUManagerPanel.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/wx/pcscdiag/pcscdiag.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/pcscdiag/pcscdiag.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/wx/pcscdiag/pcscdiag.py 2010-04-20 13:08:20 UTC (rev 392) @@ -6,7 +6,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Exceptions.py =================================================================== --- trunk/pyscard/src/smartcard/Exceptions.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Exceptions.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/ExclusiveConnectCardConnection.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/ExclusiveTransmitCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/ExclusiveTransmitCardConnection.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/ExclusiveTransmitCardConnection.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/PassThruCardService.py =================================================================== --- trunk/pyscard/src/smartcard/PassThruCardService.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/PassThruCardService.py 2010-04-20 13:08:20 UTC (rev 392) @@ -7,7 +7,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/README =================================================================== --- trunk/pyscard/src/smartcard/README 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/README 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ http://pyscard.sourceforge.net/ ------------------------------------------------------------------------------- -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. @@ -23,7 +23,7 @@ Franklin St, Fifth Floor, Boston, MA 02110-1301 USA ------------------------------------------------------------------------------- -Last update : pyscard 1.6.8 (July 2009) +Last update : pyscard 1.6.10 (April 2010) ------------------------------------------------------------------------------- pyscard is a python module adding smart cards support to python. @@ -61,7 +61,7 @@ The binary msi installer and self-executable installer are packaged for a specific version of python, and have name similar to -pyscard-1.6.8.win32-py2.5.msi and pyscard-1.6.8.win32-py2.5.exe for +pyscard-1.6.10.win32-py2.5.msi and pyscard-1.6.10.win32-py2.5.exe for python 2.5. @@ -77,8 +77,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip for windows, -and pyscard-1.6.8.tar.gz for linux. +The source distribution is available as pyscard-1.6.10.zip for windows, +and pyscard-1.6.10.tar.gz for linux. 3. unzip the source distribution, open a console and type the following: @@ -99,8 +99,8 @@ 1. download the binary distribution The binary distribution is either an archive file or a rpm file, with -names similar to pyscard-1.6.8-1.i386.rpm for the rpm distribution, -or pyscard-1.6.8.linux-i686.tar.gz for the archive distribution. +names similar to pyscard-1.6.10-1.i386.rpm for the rpm distribution, +or pyscard-1.6.10.linux-i686.tar.gz for the archive distribution. 2. untar the binary distribution @@ -115,8 +115,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar the source distribution @@ -130,7 +130,7 @@ Installation on Max OS X Tiger: -------------------------------- -The Mac OS X Tiger support is experimental on pyscard 1.6.8. It was developed +The Mac OS X Tiger support is experimental on pyscard 1.6.10. It was developed and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a ppc MacBook. @@ -140,14 +140,14 @@ 1. download the binary distribution The binary distribution is an archive file, with a name similar to -pyscard-1.6.8-py-2.3-macosx10.4.mpkg or pyscard-1.6.8-py-2.5-macosx10.4.mpkg. +pyscard-1.6.10-py-2.3-macosx10.4.mpkg or pyscard-1.6.10-py-2.5-macosx10.4.mpkg. 2. Open the package and proceed with installation. -Python 2.3 is pre-installed, so install pyscard-1.6.8-py-2.3-macosx10.4.mpkg if +Python 2.3 is pre-installed, so install pyscard-1.6.10-py-2.3-macosx10.4.mpkg if you did not install another release of python. -Install pyscard-1.6.8-py-2.5-macosx10.4.mpkg if you installed python 2.5. +Install pyscard-1.6.10-py-2.5-macosx10.4.mpkg if you installed python 2.5. Installing on Mac OS X Tiger from the source distribution ---------------------------------------------------------- @@ -157,8 +157,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar or unzip the source distribution @@ -173,7 +173,7 @@ Installation on Max OS X Leopard: --------------------------------- -The Mac OS X Leopard support is experimental on pyscard 1.6.8. It was developed +The Mac OS X Leopard support is experimental on pyscard 1.6.10. It was developed and tested on a i386 MacBook Pro. Please drop me a mail if you succeed on a ppc MacBook. @@ -183,7 +183,7 @@ 1. download the binary distribution The binary distribution is an archive file, with a name similar to -pyscard-1.6.8-py-2.5-macosx10.5.mpkg. +pyscard-1.6.10-py-2.5-macosx10.5.mpkg. 2. Open the package and proceed with installation. @@ -195,8 +195,8 @@ 2. download the source distribution -The source distribution is available as pyscard-1.6.8.zip or -pyscard-1.6.8.tar.gz. +The source distribution is available as pyscard-1.6.10.zip or +pyscard-1.6.10.tar.gz. 3. untar or unzip the source distribution @@ -235,9 +235,9 @@ setup.py build_ext bdist_wininst This will build the msi installer and self-executable installer in the dist -directory, with names similar to pyscard-1.6.8.win32-py2.5.msi and -pyscard-1.6.8.win32-py2.5.exe for python 2.5, and -pyscard-1.6.8.win32-py2.4.msi and pyscard-1.6.8.win32-py2.4.exe for +directory, with names similar to pyscard-1.6.10.win32-py2.5.msi and +pyscard-1.6.10.win32-py2.5.exe for python 2.5, and +pyscard-1.6.10.win32-py2.4.msi and pyscard-1.6.10.win32-py2.4.exe for python 2.4. Building a binary distribution for linux @@ -252,7 +252,7 @@ /usr/bin/python setup.py build_ext bdist -This will build a package similar to pyscard-1.6.8.linux-i686.tar.gz +This will build a package similar to pyscard-1.6.10.linux-i686.tar.gz containing a tree Building a rpm distribution for linux @@ -274,7 +274,7 @@ echo "%_unpackaged_files_terminate_build 0" >> /etc/rpm/macros This will build in the dist directory a binary distribution with a name -similar to pyscard-1.6.8-1.i386.rpm. +similar to pyscard-1.6.10-1.i386.rpm. Building a binary distribution for Mac OS X Tiger ------------------------------------------------- @@ -291,7 +291,7 @@ python setup.py build_ext /System/Library/Frameworks/Python.Framework/Versions/2.3/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.3-macosx10.4.mpkg. +This will build package pyscard-1.6.10-py-2.3-macosx10.4.mpkg. If you are using python 2.5, in the root directory of the source distribution, i.e. in the src directory, execute the following commands in a terminal: @@ -299,7 +299,7 @@ python setup.py build_ext /Library/Frameworks/Python.Framework/Versions/2.5/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.6-macosx10.4.mpkg. +This will build package pyscard-1.6.10-py-2.6-macosx10.4.mpkg. Building a binary distribution for Mac OS X Leopard @@ -348,7 +348,7 @@ python setup.py build_ext /Library/Frameworks/Python.Framework/Versions/2.5/Extras/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.5-macosx10.5.mpkg. +This will build package pyscard-1.6.10-py-2.5-macosx10.5.mpkg. For python 2.6, from the root directory of the pyscard source distribution, i.e. in the src directory, execute the following commands in a terminal: @@ -356,7 +356,7 @@ python setup.py build_ext /Library/Frameworks/Python.framework/Versions/2.6/bin/bdist_mpkg setup.py -This will build package pyscard-1.6.8-py-2.6-macosx10.5.mpkg. +This will build package pyscard-1.6.10-py-2.6-macosx10.5.mpkg. ------------------------------------------------------------------------------- Issue Tracking Modified: trunk/pyscard/src/smartcard/ReaderMonitoring.py =================================================================== --- trunk/pyscard/src/smartcard/ReaderMonitoring.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/ReaderMonitoring.py 2010-04-20 13:08:20 UTC (rev 392) @@ -8,7 +8,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/Session.py =================================================================== --- trunk/pyscard/src/smartcard/Session.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/Session.py 2010-04-20 13:08:20 UTC (rev 392) @@ -3,7 +3,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/System.py =================================================================== --- trunk/pyscard/src/smartcard/System.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/System.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "gemalto http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/TODO =================================================================== --- trunk/pyscard/src/smartcard/TODO 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/TODO 2010-04-20 13:08:20 UTC (rev 392) @@ -8,4 +8,4 @@ - more unit tests -July 2009 +April 2010 Modified: trunk/pyscard/src/smartcard/__init__.py =================================================================== --- trunk/pyscard/src/smartcard/__init__.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/__init__.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,10 +4,10 @@ access smartcards and readers. __author__ = "gemalto http://www.gemalto.com" -__date__ = "July 2009" -__version__ = "1.6.8" +__date__ = "April 2010" +__version__ = "1.6.10" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/doc/framework-samples.html =================================================================== --- trunk/pyscard/src/smartcard/doc/framework-samples.html 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/doc/framework-samples.html 2010-04-20 13:08:20 UTC (rev 392) @@ -12,7 +12,7 @@ secure and Free Open Source software downloads" /></a> <hr> <H1 align="center"> </h1> -Last update : pyscard 1.6.8 (July 2009) +Last update : pyscard 1.6.10 (April 2010) <p> <a href="pyscard-usersguide.html">pyscard</a> is a python module adding smart cards support to <a href="http://www.python.org">python</a>. <p>It consists of <a Modified: trunk/pyscard/src/smartcard/doc/index.html =================================================================== --- trunk/pyscard/src/smartcard/doc/index.html 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/doc/index.html 2010-04-20 13:08:20 UTC (rev 392) @@ -14,7 +14,7 @@ alt="Get pyscard at SourceForge.net. Fast, secure and Free Open Source software downloads" /></a> </h1> <hr> - Last update : pyscard 1.6.8 (July 2009) + Last update : pyscard 1.6.10 (April 2010) <p> <a href="pyscard-usersguide.html">pyscard - python smart card library</a> is a python module adding smart cards support to <a href="http://www.python.org">python.</a> Modified: trunk/pyscard/src/smartcard/doc/scard-samples.html =================================================================== --- trunk/pyscard/src/smartcard/doc/scard-samples.html 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/doc/scard-samples.html 2010-04-20 13:08:20 UTC (rev 392) @@ -12,7 +12,7 @@ secure and Free Open Source software downloads" /></a> <hr> <H1 align="center"> </h1> -Last update : pyscard 1.6.8 (July 2009) +Last update : pyscard 1.6.10 (April 2010) <p>Using the <a href="epydoc/index.html">smartcard framework</a> is the preferred way to write python smart card application. You can however use the <a href="epydoc/smartcard.scard.scard-module.html">smartcard.scard</a> library to write your python smart card application if you want to write your Modified: trunk/pyscard/src/smartcard/guid.py =================================================================== --- trunk/pyscard/src/smartcard/guid.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/guid.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardRequest.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCContext.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCContext.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCContext.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCExceptions.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCExceptions.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCExceptions.py 2010-04-20 13:08:20 UTC (rev 392) @@ -4,7 +4,7 @@ __author__ = "http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCReader.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCReader.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCReader.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "gemalto http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/pcsc/PCSCReaderGroups.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCReaderGroups.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/pcsc/PCSCReaderGroups.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "gemalto http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/reader/Reader.py =================================================================== --- trunk/pyscard/src/smartcard/reader/Reader.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/reader/Reader.py 2010-04-20 13:08:20 UTC (rev 392) @@ -2,7 +2,7 @@ __author__ = "gemalto http://www.gemalto.com" -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/reader/ReaderFactory.py =================================================================== --- trunk/pyscard/src/smartcard/reader/ReaderFactory.py 2010-04-18 08:28:44 UTC (rev 391) +++ trunk/pyscard/src/smartcard/reader/ReaderFactory.py 2010-04-20 13:08:20 UTC (rev 392) @@ -10,7 +10,7 @@ been updated to dynamically load the module with Robert Brewer ClassLoader.py. -Copyright 2001-2009 gemalto +Copyright 2001-2010 gemalto Author: Jean-Daniel Aussel, mailto:jea...@ge... This file is part of pyscard. Modified: trunk/pyscard/src/smartcard/reader/ReaderGroups.py =================================================================== --- tr... [truncated message content] |
From: <lu...@us...> - 2010-04-18 08:28:50
|
Revision: 391 http://pyscard.svn.sourceforge.net/pyscard/?rev=391&view=rev Author: ludov Date: 2010-04-18 08:28:44 +0000 (Sun, 18 Apr 2010) Log Message: ----------- Snow Leopard: do not force no optimisation with -O0 but let the user decide Modified Paths: -------------- trunk/pyscard/src/setup.py Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2010-04-18 08:26:01 UTC (rev 390) +++ trunk/pyscard/src/setup.py 2010-04-18 08:28:44 UTC (rev 391) @@ -68,7 +68,7 @@ platform_sources = [] platform_libraries = [] platform_include_dirs = [] - platform_extra_compile_args = ['-v', '-arch', 'i386', '-arch', 'x86_64', '-ggdb', '-O0'] + platform_extra_compile_args = ['-v', '-arch', 'i386', '-arch', 'x86_64', '-ggdb'] platform_extra_link_args = ['-arch', 'i386', '-arch', 'x86_64', '-ggdb'] # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-04-18 08:26:07
|
Revision: 390 http://pyscard.svn.sourceforge.net/pyscard/?rev=390&view=rev Author: ludov Date: 2010-04-18 08:26:01 +0000 (Sun, 18 Apr 2010) Log Message: ----------- For Snow Leopard, do not pass -framework PCSC to the compiler since that generates warnings: i686-apple-darwin10-gcc-4.2.1: -framework: linker input file unused because linking not done i686-apple-darwin10-gcc-4.2.1: PCSC: linker input file unused because linking not done We do not need to link with -framework PCSC since we do a dynamic loading using dlopen() Thanks to Martin Paljak for the patch Modified Paths: -------------- trunk/pyscard/src/setup.py Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2010-04-18 08:10:13 UTC (rev 389) +++ trunk/pyscard/src/setup.py 2010-04-18 08:26:01 UTC (rev 390) @@ -68,8 +68,7 @@ platform_sources = [] platform_libraries = [] platform_include_dirs = [] - platform_extra_compile_args = ['-v', '-framework', 'PCSC', '-arch', - 'i386', '-arch', 'x86_64', '-ggdb', '-O0'] + platform_extra_compile_args = ['-v', '-arch', 'i386', '-arch', 'x86_64', '-ggdb', '-O0'] platform_extra_link_args = ['-arch', 'i386', '-arch', 'x86_64', '-ggdb'] # This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |