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-04-18 08:10:19
|
Revision: 389 http://pyscard.svn.sourceforge.net/pyscard/?rev=389&view=rev Author: ludov Date: 2010-04-18 08:10:13 +0000 (Sun, 18 Apr 2010) Log Message: ----------- Define MAX_BUFFER_SIZE_EXTENDED only if pcsc-lite is not used (Windows). pcsc-lite already defines it. Thanks to Martin Paljak for the bug report 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-04-07 06:48:50 UTC (rev 388) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-04-18 08:10:13 UTC (rev 389) @@ -180,10 +180,10 @@ #endif #else // !PCSCLITE // SCARD_CTL_CODE defined in WinSmCrd.h included by Win32 winscard.h +// MAX_BUFFER_SIZE_EXTENDED is pcsc-lite specific +#define MAX_BUFFER_SIZE_EXTENDED (1<<16) #endif //PCSCLITE -#define MAX_BUFFER_SIZE_EXTENDED (1<<16) - #include "pcsctypes.h" #include "helpers.h" #include "memlog.h" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-04-07 06:48:56
|
Revision: 388 http://pyscard.svn.sourceforge.net/pyscard/?rev=388&view=rev Author: ludov Date: 2010-04-07 06:48:50 +0000 (Wed, 07 Apr 2010) Log Message: ----------- Correctly format the Logical channel number assignment line Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-04-07 06:43:58 UTC (rev 387) +++ trunk/contrib/parseATR/parseATR.py 2010-04-07 06:48:50 UTC (rev 388) @@ -436,7 +436,7 @@ v = (cc >> 3) & 3 t = ["No logical channel\n", "by the interface device\n", "by the card\n", "by the interface device and card\n"] - text.append(t[v]) + text.append(" - Logical channel number assignment: " + t[v]) text.append(" - Maximum number of logical channels: %d\n" % (cc & 7)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-04-07 06:44:04
|
Revision: 387 http://pyscard.svn.sourceforge.net/pyscard/?rev=387&view=rev Author: ludov Date: 2010-04-07 06:43:58 +0000 (Wed, 07 Apr 2010) Log Message: ----------- add a missing \n Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-03-17 19:34:37 UTC (rev 386) +++ trunk/contrib/parseATR/parseATR.py 2010-04-07 06:43:58 UTC (rev 387) @@ -351,7 +351,7 @@ text.append("in") text.append("valid\n") - text.append(" - Data unit in quartets: %d" % (dc & 15)) + text.append(" - Data unit in quartets: %d\n" % (dc & 15)) return ''.join(text) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-17 19:34:43
|
Revision: 386 http://pyscard.svn.sourceforge.net/pyscard/?rev=386&view=rev Author: ludov Date: 2010-03-17 19:34:37 +0000 (Wed, 17 Mar 2010) Log Message: ----------- also use parseATR.match_atr() to find a card description Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-03-17 19:32:16 UTC (rev 385) +++ trunk/contrib/parseATR/stress_test.py 2010-03-17 19:34:37 UTC (rev 386) @@ -46,5 +46,10 @@ print e else: print txt + 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-03-17 19:32:23
|
Revision: 385 http://pyscard.svn.sourceforge.net/pyscard/?rev=385&view=rev Author: ludov Date: 2010-03-17 19:32:16 +0000 (Wed, 17 Mar 2010) Log Message: ----------- Do not ignore '.' in ATR and replace it by '0' Modified Paths: -------------- trunk/contrib/parseATR/stress_test.py Modified: trunk/contrib/parseATR/stress_test.py =================================================================== --- trunk/contrib/parseATR/stress_test.py 2010-03-17 17:29:34 UTC (rev 384) +++ trunk/contrib/parseATR/stress_test.py 2010-03-17 19:32:16 UTC (rev 385) @@ -1,7 +1,7 @@ #! /usr/bin/env python """ stress_test.py - Copyright (C) 2009 Ludovic Rousseau + Copyright (C) 2009-2010 Ludovic Rousseau This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -29,15 +29,13 @@ List = sys.argv[1] for atr in open(List): - if atr[0] != "3": + if not atr.startswith("3"): continue if "[" in atr: continue - if "." in atr: - continue - if "?" in atr: - continue + atr = atr.replace('.', '0') + # remove traling newline atr = atr.rstrip() print "ATR:", atr This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-17 17:29:40
|
Revision: 384 http://pyscard.svn.sourceforge.net/pyscard/?rev=384&view=rev Author: ludov Date: 2010-03-17 17:29:34 +0000 (Wed, 17 Mar 2010) Log Message: ----------- do not give a defailt value to toHexString as pylint complaints Dangerous default value [] as argument Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-03-17 14:46:09 UTC (rev 383) +++ trunk/contrib/parseATR/parseATR.py 2010-03-17 17:29:34 UTC (rev 384) @@ -36,7 +36,7 @@ return self.text -def toHexString(bytes=[]): +def toHexString(bytes): """ return a hex list """ return " ".join(["%02X" % b for b in bytes]) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-17 14:46:21
|
Revision: 383 http://pyscard.svn.sourceforge.net/pyscard/?rev=383&view=rev Author: ludov Date: 2010-03-17 14:46:09 +0000 (Wed, 17 Mar 2010) Log Message: ----------- use regular expression to match ATR Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-03-12 10:34:04 UTC (rev 382) +++ trunk/contrib/parseATR/parseATR.py 2010-03-17 14:46:09 UTC (rev 383) @@ -23,6 +23,7 @@ T = -1 import exceptions +import re class ParseAtrException(exceptions.Exception): @@ -735,12 +736,16 @@ atr = toHexString(normalize(atr)) file = open(atr_file) for line in file: - if line.startswith("#"): + if line.startswith("#") or line.startswith("\t") or line == "\n": continue line = line.rstrip("\n") - if line == atr: + pattern = re.compile(line) + if pattern.match(atr): # found the ATR + if atr != line: + card.append("") + card.append(line) for desc in file: if desc == "\n": break This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-12 10:34:11
|
Revision: 382 http://pyscard.svn.sourceforge.net/pyscard/?rev=382&view=rev Author: ludov Date: 2010-03-12 10:34:04 +0000 (Fri, 12 Mar 2010) Log Message: ----------- call winscard_init() to load the library only in the %init section instead of in each wrapped function. The side effect is that the library is loaded at the import time and not when the first PC/SC function is called. We then avoid loading the library in a Python thread (crashes on Mac OS X). 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-03-11 09:22:34 UTC (rev 381) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-03-12 10:34:04 UTC (rev 382) @@ -210,7 +210,6 @@ char* szReaderName, char* szGroupName ) { - winscard_init(); return (mySCardAddReaderToGroupA)( hcontext, szReaderName, @@ -220,21 +219,18 @@ /////////////////////////////////////////////////////////////////////////////// SCARDRETCODE _ForgetCardType( SCARDCONTEXT hcontext, char* pszCardName ) { - winscard_init(); return (mySCardForgetCardTypeA)( hcontext, pszCardName ); } /////////////////////////////////////////////////////////////////////////////// SCARDRETCODE _ForgetReader( SCARDCONTEXT hcontext, char* szReaderName ) { - winscard_init(); return (mySCardForgetReaderA)( hcontext, szReaderName ); } /////////////////////////////////////////////////////////////////////////////// SCARDRETCODE _ForgetReaderGroup( SCARDCONTEXT hcontext, char* szGroupName ) { - winscard_init(); return (mySCardForgetReaderGroupA)( hcontext, szGroupName ); } @@ -248,7 +244,6 @@ long lRetCode; unsigned long cchProviderName=SCARD_AUTOALLOCATE; - winscard_init(); // autoallocate memory; will be freed on output typemap psl->hcontext=hcontext; @@ -271,7 +266,6 @@ BYTELIST* pbAtrMask ) { - winscard_init(); return (mySCardIntroduceCardTypeA)( hcontext, pszCardName, @@ -286,14 +280,12 @@ /////////////////////////////////////////////////////////////////////////////// SCARDRETCODE _IntroduceReader( SCARDCONTEXT hcontext, char* szReaderName, char* szDeviceName ) { - winscard_init(); return (mySCardIntroduceReaderA)( hcontext, szReaderName, szDeviceName ); } /////////////////////////////////////////////////////////////////////////////// SCARDRETCODE _IntroduceReaderGroup( SCARDCONTEXT hcontext, char* szGroupName ) { - winscard_init(); return (mySCardIntroduceReaderGroupA)( hcontext, szGroupName ); } @@ -303,7 +295,6 @@ // autoallocate memory; will be freed on output typemap unsigned long cchCards=SCARD_AUTOALLOCATE; - winscard_init(); pmszCards->ac=NULL; pmszCards->hcontext=hcontext; @@ -327,8 +318,6 @@ { long lRetCode; - winscard_init(); - pgl->cGuids = SCARD_AUTOALLOCATE; pgl->hcontext = hcontext; pgl->aguid = NULL; @@ -351,8 +340,6 @@ { LPCSTR pcstr=(0==strlen((LPCTSTR)mszCards->ac)) ? NULL : (LPCTSTR)mszCards->ac; - winscard_init(); - return (mySCardLocateCardsA)( hcontext, pcstr, @@ -366,7 +353,6 @@ char* szReaderName, char* szGroupName ) { - winscard_init(); return (mySCardRemoveReaderFromGroupA)( hcontext, szReaderName, @@ -383,7 +369,6 @@ /////////////////////////////////////////////////////////////////////////////// static SCARDRETCODE _IsValidContext( SCARDCONTEXT hcontext ) { - winscard_init(); return (mySCardIsValidContext)( hcontext ); } @@ -392,8 +377,6 @@ { long lRetCode; - winscard_init(); - pbl->cBytes = 0; pbl->ab = NULL; @@ -418,8 +401,6 @@ { long lRetCode; - winscard_init(); - lRetCode = (mySCardSetAttrib)( hcard, dwAttrId, pbl->ab, pbl->cBytes ); return lRetCode; } @@ -439,7 +420,6 @@ ) { SCARDRETCODE lRet; - winscard_init(); pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; @@ -462,7 +442,6 @@ ) { SCARDRETCODE lRet; - winscard_init(); pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; @@ -482,14 +461,12 @@ /////////////////////////////////////////////////////////////////////////////// static SCARDRETCODE _BeginTransaction( SCARDHANDLE hcard ) { - winscard_init(); return (mySCardBeginTransaction)( hcard ); } /////////////////////////////////////////////////////////////////////////////// static SCARDRETCODE _Cancel( SCARDCONTEXT hcontext ) { - winscard_init(); return (mySCardCancel)( hcontext ); } @@ -505,7 +482,6 @@ { SCARDRETCODE lRet; - winscard_init(); lRet = (mySCardConnectA)( hcontext, (LPCTSTR)szReader, @@ -520,14 +496,12 @@ /////////////////////////////////////////////////////////////////////////////// static SCARDRETCODE _Disconnect( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) { - winscard_init(); return (mySCardDisconnect)( hcard, dwDisposition ); } /////////////////////////////////////////////////////////////////////////////// static SCARDRETCODE _EndTransaction( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) { - winscard_init(); return (mySCardEndTransaction)( hcard, dwDisposition ); } @@ -535,7 +509,6 @@ static SCARDRETCODE _EstablishContext( SCARDDWORDARG dwScope, SCARDCONTEXT* phContext ) { long lRet; - winscard_init(); lRet = (mySCardEstablishContext)( dwScope, NULL, NULL, phContext ); #ifdef __TIGER__ @@ -562,8 +535,6 @@ SCARDRETCODE hresult; int i; - winscard_init(); - // bad reader state list if( NULL==prsl ) { @@ -615,8 +586,6 @@ SCARDDWORDARG cchReaders; LONG lRetCode; - winscard_init(); - if (pmszGroups) { mszGroups=pmszGroups->ac; @@ -675,8 +644,6 @@ DWORD cchReaderGroups; LONG lRetCode; - winscard_init(); - #ifdef NOAUTOALLOCATE cchReaderGroups = SCARD_AUTOALLOCATE; pmszReaderGroups->ac=NULL; @@ -727,8 +694,6 @@ SCARDDWORDARG* pdwActiveProtocol ) { - winscard_init(); - return (mySCardReconnect)( hcard, dwShareMode, @@ -741,7 +706,6 @@ static SCARDRETCODE _ReleaseContext( SCARDCONTEXT hcontext ) { SCARDRETCODE lRet; - winscard_init(); lRet = (mySCardReleaseContext)( hcontext ); return lRet; } @@ -759,7 +723,6 @@ SCARDDWORDARG dwReaderLen=256; SCARDDWORDARG dwAtrLen=36; - winscard_init(); for(;;) { pbl->ab = (unsigned char*)mem_Malloc(dwAtrLen*sizeof(unsigned char)); @@ -801,8 +764,6 @@ PSCARD_IO_REQUEST piorequest=NULL; long ret; - winscard_init(); - pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; @@ -843,6 +804,7 @@ return SCARD_CTL_CODE(code); } +/////////////////////////////////////////////////////////////////////////////// static ERRORSTRING* _GetErrorMessage( long lErrCode ) { #ifdef WIN32 @@ -2087,6 +2049,9 @@ PyExc_SCardError = PyErr_NewException("scard.error", NULL, NULL); if (PyExc_SCardError != NULL) PyDict_SetItemString(d, "error", PyExc_SCardError); + + /* load the PCSC library */ + winscard_init(); %} //---------------------------------------------------------------------- This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-11 09:22:40
|
Revision: 381 http://pyscard.svn.sourceforge.net/pyscard/?rev=381&view=rev Author: ludov Date: 2010-03-11 09:22:34 +0000 (Thu, 11 Mar 2010) Log Message: ----------- Use MAX_BUFFER_SIZE_EXTENDED (64k) instead of 1024 for the receiving buffer of SCardControl() and SCardTransmit() Fixes "SCardTransmit with ISO7816 extended case APDU - ID: 2914636" https://sourceforge.net/tracker/?func=detail&aid=2914636&group_id=196342&atid=957072 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-03-10 12:46:10 UTC (rev 380) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-03-11 09:22:34 UTC (rev 381) @@ -182,6 +182,8 @@ // SCARD_CTL_CODE defined in WinSmCrd.h included by Win32 winscard.h #endif //PCSCLITE +#define MAX_BUFFER_SIZE_EXTENDED (1<<16) + #include "pcsctypes.h" #include "helpers.h" #include "memlog.h" @@ -439,8 +441,8 @@ SCARDRETCODE lRet; winscard_init(); - pblRecvBuffer->ab = (unsigned char*)mem_Malloc(1024*sizeof(unsigned char)); - pblRecvBuffer->cBytes=1024; + pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); + pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; lRet = (mySCardControl)( hcard, @@ -462,8 +464,8 @@ SCARDRETCODE lRet; winscard_init(); - pblRecvBuffer->ab = (unsigned char*)mem_Malloc(1024*sizeof(unsigned char)); - pblRecvBuffer->cBytes=1024; + pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); + pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; lRet = (mySCardControl)( hcard, @@ -801,8 +803,8 @@ winscard_init(); - pblRecvBuffer->ab = (unsigned char*)mem_Malloc(1024*sizeof(unsigned char)); - pblRecvBuffer->cBytes=1024; + pblRecvBuffer->ab = (unsigned char*)mem_Malloc(MAX_BUFFER_SIZE_EXTENDED*sizeof(unsigned char)); + pblRecvBuffer->cBytes = MAX_BUFFER_SIZE_EXTENDED; // keep in sync with redefinition in PcscDefs.i switch(pioSendPci) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:46:17
|
Revision: 380 http://pyscard.svn.sourceforge.net/pyscard/?rev=380&view=rev Author: ludov Date: 2010-03-10 12:46:10 +0000 (Wed, 10 Mar 2010) Log Message: ----------- define local _* functions as static to avoid compiler warning: no previous prototype for '_*' 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-03-10 12:38:32 UTC (rev 379) +++ trunk/pyscard/src/smartcard/scard/scard.i 2010-03-10 12:46:10 UTC (rev 380) @@ -379,14 +379,14 @@ // #ifndef __TIGER__ /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _IsValidContext( SCARDCONTEXT hcontext ) +static SCARDRETCODE _IsValidContext( SCARDCONTEXT hcontext ) { winscard_init(); return (mySCardIsValidContext)( hcontext ); } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _GetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* pbl ) +static SCARDRETCODE _GetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* pbl ) { long lRetCode; @@ -412,7 +412,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _SetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* pbl ) +static SCARDRETCODE _SetAttrib( SCARDHANDLE hcard, SCARDDWORDARG dwAttrId, BYTELIST* pbl ) { long lRetCode; @@ -430,7 +430,7 @@ #ifdef __TIGER__ /////////////////////////////////////////////////////////////////////////////// - SCARDRETCODE _Control( + static SCARDRETCODE _Control( SCARDHANDLE hcard, BYTELIST* pblSendBuffer, BYTELIST* pblRecvBuffer @@ -452,7 +452,7 @@ } #else // !__TIGER__ /////////////////////////////////////////////////////////////////////////////// - SCARDRETCODE _Control( + static SCARDRETCODE _Control( SCARDHANDLE hcard, SCARDDWORDARG controlCode, BYTELIST* pblSendBuffer, @@ -478,21 +478,21 @@ #endif // __TIGER__ /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _BeginTransaction( SCARDHANDLE hcard ) +static SCARDRETCODE _BeginTransaction( SCARDHANDLE hcard ) { winscard_init(); return (mySCardBeginTransaction)( hcard ); } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Cancel( SCARDCONTEXT hcontext ) +static SCARDRETCODE _Cancel( SCARDCONTEXT hcontext ) { winscard_init(); return (mySCardCancel)( hcontext ); } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Connect( +static SCARDRETCODE _Connect( SCARDCONTEXT hcontext, char* szReader, SCARDDWORDARG dwShareMode, @@ -516,21 +516,21 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Disconnect( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) +static SCARDRETCODE _Disconnect( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) { winscard_init(); return (mySCardDisconnect)( hcard, dwDisposition ); } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _EndTransaction( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) +static SCARDRETCODE _EndTransaction( SCARDHANDLE hcard, SCARDDWORDARG dwDisposition ) { winscard_init(); return (mySCardEndTransaction)( hcard, dwDisposition ); } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _EstablishContext( SCARDDWORDARG dwScope, SCARDCONTEXT* phContext ) +static SCARDRETCODE _EstablishContext( SCARDDWORDARG dwScope, SCARDCONTEXT* phContext ) { long lRet; winscard_init(); @@ -552,7 +552,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _GetStatusChange( +static SCARDRETCODE _GetStatusChange( SCARDCONTEXT hcontext, SCARDDWORDARG dwTimeout, READERSTATELIST* prsl ) @@ -604,7 +604,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _ListReaders( +static SCARDRETCODE _ListReaders( SCARDCONTEXT hcontext, STRINGLIST* pmszGroups, STRINGLIST* pmszReaders ) @@ -668,7 +668,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _ListReaderGroups( SCARDCONTEXT hcontext, STRINGLIST* pmszReaderGroups ) +static SCARDRETCODE _ListReaderGroups( SCARDCONTEXT hcontext, STRINGLIST* pmszReaderGroups ) { DWORD cchReaderGroups; LONG lRetCode; @@ -717,7 +717,7 @@ /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Reconnect( +static SCARDRETCODE _Reconnect( SCARDHANDLE hcard, SCARDDWORDARG dwShareMode, SCARDDWORDARG dwPreferredProtocols, @@ -736,7 +736,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _ReleaseContext( SCARDCONTEXT hcontext ) +static SCARDRETCODE _ReleaseContext( SCARDCONTEXT hcontext ) { SCARDRETCODE lRet; winscard_init(); @@ -745,7 +745,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Status( +static SCARDRETCODE _Status( SCARDHANDLE hcard, STRING* pszReaderName, SCARDDWORDARG* pdwState, @@ -789,7 +789,7 @@ } /////////////////////////////////////////////////////////////////////////////// -SCARDRETCODE _Transmit( +static SCARDRETCODE _Transmit( SCARDHANDLE hcard, unsigned long pioSendPci, BYTELIST* pblSendBuffer, @@ -836,12 +836,12 @@ } /////////////////////////////////////////////////////////////////////////////// -long _SCARD_CTL_CODE( long code ) +static long _SCARD_CTL_CODE( long code ) { return SCARD_CTL_CODE(code); } -ERRORSTRING* _GetErrorMessage( long lErrCode ) +static ERRORSTRING* _GetErrorMessage( long lErrCode ) { #ifdef WIN32 #define _NO_SERVICE_MSG "The Smart card resource manager is not running." This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:38:39
|
Revision: 379 http://pyscard.svn.sourceforge.net/pyscard/?rev=379&view=rev Author: ludov Date: 2010-03-10 12:38:32 +0000 (Wed, 10 Mar 2010) Log Message: ----------- fix comiler warning smartcard/scard/winscarddll.c: In function ?\226?\128?\152winscard_init?\226?\128?\153: smartcard/scard/winscarddll.c:758: warning: assignment discards qualifiers from pointer target type Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.c Modified: trunk/pyscard/src/smartcard/scard/winscarddll.c =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:34:32 UTC (rev 378) +++ trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:38:32 UTC (rev 379) @@ -753,7 +753,7 @@ void* handle=NULL; char* dlsym_error; - char *lib = NULL; + const char *lib = NULL; #ifdef __APPLE__ lib = "/System/Library/Frameworks/PCSC.framework/PCSC"; #else This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:34:38
|
Revision: 378 http://pyscard.svn.sourceforge.net/pyscard/?rev=378&view=rev Author: ludov Date: 2010-03-10 12:34:32 +0000 (Wed, 10 Mar 2010) Log Message: ----------- Reformat to make pep8 happy Modified Paths: -------------- trunk/pyscard/src/setup.py Modified: trunk/pyscard/src/setup.py =================================================================== --- trunk/pyscard/src/setup.py 2010-03-10 12:33:32 UTC (rev 377) +++ trunk/pyscard/src/setup.py 2010-03-10 12:34:32 UTC (rev 378) @@ -45,11 +45,13 @@ # # Mac OS X Tiger has python 2.3 preinstalled -# get_platform() returns a string similar to 'darwin-8.11.1-i386' with python 2.3 -# if python 2.5 is installed, get_platform() returns a string similar to 'macosx-10.3-fat' +# get_platform() returns a string similar to 'darwin-8.11.1-i386' with +# python 2.3 +# if python 2.5 is installed, get_platform() returns a string similar to +# 'macosx-10.3-fat' elif 'darwin' in get_platform() or 'macosx-10.3' in get_platform() or 'macosx-10.4' in get_platform(): - platform__cc_defines = [ ('PCSCLITE', '1'), ('__APPLE__', '1'), ('__TIGER__', '1')] - platform_swig_opts = [ '-DPCSCLITE', '-D__APPLE__', '-D__TIGER__' ] + platform__cc_defines = [('PCSCLITE', '1'), ('__APPLE__', '1'), ('__TIGER__', '1')] + platform_swig_opts = ['-DPCSCLITE', '-D__APPLE__', '-D__TIGER__'] platform_sources = [] platform_libraries = [] platform_include_dirs = [] @@ -61,8 +63,8 @@ # PowerPC is no more supported, x86_64 is new # elif 'macosx-10.6' in get_platform(): - platform__cc_defines = [ ('PCSCLITE', '1'), ('__APPLE__', '1'), ('__LEOPARD__', '1')] - platform_swig_opts = [ '-DPCSCLITE', '-D__APPLE__', '-D__LEOPARD__' ] + platform__cc_defines = [('PCSCLITE', '1'), ('__APPLE__', '1'), ('__LEOPARD__', '1')] + platform_swig_opts = ['-DPCSCLITE', '-D__APPLE__', '-D__LEOPARD__'] platform_sources = [] platform_libraries = [] platform_include_dirs = [] @@ -75,8 +77,8 @@ # get_platform() returns a string similar to 'macosx-10.5-i386' # elif 'macosx-10.' in get_platform(): - platform__cc_defines = [ ('PCSCLITE', '1'), ('__APPLE__', '1'), ('__LEOPARD__', '1')] - platform_swig_opts = [ '-DPCSCLITE', '-D__APPLE__', '-D__LEOPARD__' ] + platform__cc_defines = [('PCSCLITE', '1'), ('__APPLE__', '1'), ('__LEOPARD__', '1')] + platform_swig_opts = ['-DPCSCLITE', '-D__APPLE__', '-D__LEOPARD__'] platform_sources = [] platform_libraries = [] platform_include_dirs = [] @@ -100,7 +102,7 @@ # This is to add support of swig_opts for Python 2.3 distutils # (in particular for MacOS X darwin that comes with Python 2.3) - def swig_sources (self, sources): + def swig_sources(self, sources): """Walk the list of source files in 'sources', looking for SWIG interface (.i) files. Run SWIG on all that are found, and @@ -159,25 +161,25 @@ 'long_description': 'Smartcard package for Python', 'license': 'GNU LESSER GENERAL PUBLIC LICENSE', 'platforms': ['linux', 'win32'], - 'packages' : [ "smartcard", - "smartcard/pcsc", - "smartcard/reader", - "smartcard/scard", - "smartcard/sw", - "smartcard/util", - "smartcard/wx", - ], - 'package_dir' : { "": "." }, - 'package_data' : { - "smartcard" : [ + 'packages': ["smartcard", + "smartcard/pcsc", + "smartcard/reader", + "smartcard/scard", + "smartcard/sw", + "smartcard/util", + "smartcard/wx", + ], + 'package_dir': {"": "."}, + 'package_data': { + "smartcard": [ "ACKS", "ChangeLog", "LICENSE", "README", "TODO", ], - "smartcard/wx" : ["resources/*.ico"], - } , + "smartcard/wx": ["resources/*.ico"], + }, # the _scard.pyd extension to build 'ext_modules': [Extension("smartcard.scard._scard", @@ -206,7 +208,7 @@ ] if 'download_url' in core.setup_keywords: kw['download_url'] = ('http://sourceforge.net/projects/pyscard/' - '%s-%s.zip' % (kw['name'], kw['version']) ) + '%s-%s.zip' % (kw['name'], kw['version'])) pyscard_dist = core.setup(**kw) @@ -223,9 +225,9 @@ files = [] for directory in package_data: for pattern in package_data[directory]: - filelist = glob( os.path.join( directory, convert_path(pattern) ) ) - files.extend( [fn for fn in filelist if fn not in files] ) + filelist = glob(os.path.join(directory, convert_path(pattern))) + files.extend([fn for fn in filelist if fn not in files]) for file in files: - newdir = os.path.dirname( file ) - dir_util.mkpath( os.path.join( targetdir, newdir ) ) - file_util.copy_file( file, os.path.join( targetdir, file ) ) + newdir = os.path.dirname(file) + dir_util.mkpath(os.path.join(targetdir, newdir)) + file_util.copy_file(file, os.path.join(targetdir, file)) This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:33:39
|
Revision: 377 http://pyscard.svn.sourceforge.net/pyscard/?rev=377&view=rev Author: ludov Date: 2010-03-10 12:33:32 +0000 (Wed, 10 Mar 2010) Log Message: ----------- use (void)param; declaration to avoid compiler warning: warning: unused parameter ?\226?\128?\152param?\226?\128?\153 Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.c Modified: trunk/pyscard/src/smartcard/scard/winscarddll.c =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:16:50 UTC (rev 376) +++ trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:33:32 UTC (rev 377) @@ -236,6 +236,8 @@ WINAPI _defaultSCARDISVALIDCONTEXT( IN SCARDCONTEXT hContext) { + (void)hContext; + return SCARD_E_NO_SERVICE; } @@ -246,6 +248,11 @@ OUT LPBYTE pbAttr, IN OUT SCARDDWORDARG* pcbAttrLen) { + (void)hCard; + (void)dwAttrId; + (void)pbAttr; + (void)pcbAttrLen; + return SCARD_E_NO_SERVICE; } @@ -256,6 +263,11 @@ IN LPCBYTE pbAttr, IN SCARDDWORDARG cbAttrLen) { + (void)hCard; + (void)dwAttrId; + (void)pbAttr; + (void)cbAttrLen; + return SCARD_E_NO_SERVICE; } @@ -290,6 +302,14 @@ IN SCARDDWORDARG nOutBufferSize, OUT SCARDDWORDARG* lpBytesReturned) { + (void)hCard; + (void)dwControlCode; + (void)lpInBuffer; + (void)nInBufferSize; + (void)lpOutBuffer; + (void)nOutBufferSize; + (void)lpBytesReturned; + return SCARD_E_NO_SERVICE; } #endif // __TIGER__ @@ -428,6 +448,8 @@ WINAPI _defaultSCARDBEGINTRANSACTION( IN SCARDHANDLE hCard) { + (void)hCard; + return SCARD_E_NO_SERVICE; } @@ -435,6 +457,8 @@ WINAPI _defaultSCARDCANCEL( IN SCARDCONTEXT hContext) { + (void)hContext; + return SCARD_E_NO_SERVICE; } @@ -442,6 +466,8 @@ WINAPI _defaultSCARDCANCELTRANSACTION( IN SCARDHANDLE hCard) { + (void)hCard; + return SCARD_E_NO_SERVICE; } @@ -454,6 +480,13 @@ OUT LPSCARDHANDLE phCard, OUT SCARDDWORDARG* pdwActiveProtocol) { + (void)hContext; + (void)szReader; + (void)dwShareMode; + (void)dwPreferredProtocols; + (void)phCard; + (void)pdwActiveProtocol; + return SCARD_E_NO_SERVICE; } @@ -462,6 +495,9 @@ IN SCARDHANDLE hCard, IN SCARDDWORDARG dwDisposition) { + (void)hCard; + (void)dwDisposition; + return SCARD_E_NO_SERVICE; } @@ -470,6 +506,9 @@ IN SCARDHANDLE hCard, IN SCARDDWORDARG dwDisposition) { + (void)hCard; + (void)dwDisposition; + return SCARD_E_NO_SERVICE; } @@ -480,6 +519,11 @@ IN LPCVOID pvReserved2, OUT LPSCARDCONTEXT phContext) { + (void)dwScope; + (void)pvReserved1; + (void)pvReserved2; + (void)phContext; + return SCARD_E_NO_SERVICE; } @@ -488,6 +532,9 @@ IN SCARDCONTEXT hContext, IN LPCVOID pvMem) { + (void)hContext; + (void)pvMem; + return SCARD_E_NO_SERVICE; } @@ -498,6 +545,11 @@ IN OUT LPSCARD_READERSTATEA rgReaderStates, IN SCARDDWORDARG cReaders) { + (void)hContext; + (void)dwTimeout; + (void)rgReaderStates; + (void)cReaders; + return SCARD_E_NO_SERVICE; } @@ -508,6 +560,11 @@ OUT LPTSTR mszReaders, IN OUT SCARDDWORDARG* pcchReaders) { + (void)hContext; + (void)mszGroups; + (void)mszReaders; + (void)pcchReaders; + return SCARD_E_NO_SERVICE; } @@ -517,6 +574,10 @@ OUT LPTSTR mszGroups, IN OUT SCARDDWORDARG* pcchGroups) { + (void)hContext; + (void)mszGroups; + (void)pcchGroups; + return SCARD_E_NO_SERVICE; } @@ -528,6 +589,12 @@ IN SCARDDWORDARG dwInitialization, OUT SCARDDWORDARG* pdwActiveProtocol) { + (void)hCard; + (void)dwShareMode; + (void)dwPreferredProtocols; + (void)dwInitialization; + (void)pdwActiveProtocol; + return SCARD_E_NO_SERVICE; } @@ -535,6 +602,8 @@ WINAPI _defaultSCARDRELEASECONTEXT( IN SCARDCONTEXT hContext) { + (void)hContext; + return SCARD_E_NO_SERVICE; } @@ -548,6 +617,14 @@ OUT LPBYTE pbAtr, IN OUT SCARDDWORDARG* pcbAtrLen) { + (void)hCard; + (void)szReaderName; + (void)pcchReaderLen; + (void)pdwState; + (void)pdwProtocol; + (void)pbAtr; + (void)pcbAtrLen; + return SCARD_E_NO_SERVICE; } @@ -561,6 +638,14 @@ OUT LPBYTE pbRecvBuffer, IN OUT SCARDDWORDARG* pcbRecvLength) { + (void)hCard; + (void)pioSendPci; + (void)pbSendBuffer; + (void)cbSendLength; + (void)pioRecvPci; + (void)pbRecvBuffer; + (void)pcbRecvLength; + return SCARD_E_NO_SERVICE; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:16:58
|
Revision: 376 http://pyscard.svn.sourceforge.net/pyscard/?rev=376&view=rev Author: ludov Date: 2010-03-10 12:16:50 +0000 (Wed, 10 Mar 2010) Log Message: ----------- define _default* functions as static to avoid compiler warning: no previous prototype for ?\226?\128?\152_default*?\226?\128?\153 Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.c Modified: trunk/pyscard/src/smartcard/scard/winscarddll.c =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:08:56 UTC (rev 375) +++ trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-10 12:16:50 UTC (rev 376) @@ -232,14 +232,14 @@ // These functions are not available on Max OS X Tiger // #ifndef __TIGER__ - WINSCARDAPI SCARDRETCODE + static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDISVALIDCONTEXT( IN SCARDCONTEXT hContext) { return SCARD_E_NO_SERVICE; } - WINSCARDAPI SCARDRETCODE + static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDGETATTRIB( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwAttrId, @@ -249,7 +249,7 @@ return SCARD_E_NO_SERVICE; } - WINSCARDAPI SCARDRETCODE + static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDSETATTRIB( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwAttrId, @@ -269,7 +269,7 @@ // SCardControl does not have the same prototype on Mac OS X Tiger // #ifdef __TIGER__ - WINSCARDAPI SCARDRETCODE + static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDCONTROL( IN SCARDHANDLE hCard, IN const unsigned char* lpInBuffer, @@ -280,7 +280,7 @@ return SCARD_E_NO_SERVICE; } #else // !__TIGER__ - WINSCARDAPI SCARDRETCODE + static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDCONTROL( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwControlCode, @@ -299,7 +299,7 @@ // some pcsclite versions (e.g. on Max OS X Tiger) have no pcsc_stringify // this function was taken from pcsclite // -char* _defaultPCSCSTRINGIFYERROR( SCARDRETCODE pcscError ) +static char* _defaultPCSCSTRINGIFYERROR( SCARDRETCODE pcscError ) { static char strError[75]; @@ -424,28 +424,28 @@ } #endif -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDBEGINTRANSACTION( IN SCARDHANDLE hCard) { return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDCANCEL( IN SCARDCONTEXT hContext) { return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDCANCELTRANSACTION( IN SCARDHANDLE hCard) { return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDCONNECTA( IN SCARDCONTEXT hContext, IN LPCTSTR szReader, @@ -457,7 +457,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDDISCONNECT( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwDisposition) @@ -465,7 +465,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDENDTRANSACTION( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwDisposition) @@ -473,7 +473,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDESTABLISHCONTEXT( IN SCARDDWORDARG dwScope, IN LPCVOID pvReserved1, @@ -483,7 +483,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDFREEMEMORY( IN SCARDCONTEXT hContext, IN LPCVOID pvMem) @@ -491,7 +491,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDGETSTATUSCHANGEA( IN SCARDCONTEXT hContext, IN SCARDDWORDARG dwTimeout, @@ -501,7 +501,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDLISTREADERSA( IN SCARDCONTEXT hContext, IN LPCTSTR mszGroups, @@ -511,7 +511,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDLISTREADERGROUPSA( IN SCARDCONTEXT hContext, OUT LPTSTR mszGroups, @@ -520,7 +520,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDRECONNECT( IN SCARDHANDLE hCard, IN SCARDDWORDARG dwShareMode, @@ -531,14 +531,14 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDRELEASECONTEXT( IN SCARDCONTEXT hContext) { return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDSTATUSA( IN SCARDHANDLE hCard, OUT LPTSTR szReaderName, @@ -551,7 +551,7 @@ return SCARD_E_NO_SERVICE; } -WINSCARDAPI SCARDRETCODE +static WINSCARDAPI SCARDRETCODE WINAPI _defaultSCARDTRANSMIT( IN SCARDHANDLE hCard, IN LPCSCARD_IO_REQUEST pioSendPci, This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-10 12:09:03
|
Revision: 375 http://pyscard.svn.sourceforge.net/pyscard/?rev=375&view=rev Author: ludov Date: 2010-03-10 12:08:56 +0000 (Wed, 10 Mar 2010) Log Message: ----------- do not use PCSC_API (defined as nothing) Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.h Modified: trunk/pyscard/src/smartcard/scard/winscarddll.h =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.h 2010-03-09 14:21:05 UTC (rev 374) +++ trunk/pyscard/src/smartcard/scard/winscarddll.h 2010-03-10 12:08:56 UTC (rev 375) @@ -27,9 +27,6 @@ #endif #ifdef __APPLE__ - #ifndef PCSC_API - #define PCSC_API - #endif #include <PCSC/wintypes.h> #include <PCSC/winscard.h> #define LPCTSTR char* @@ -38,7 +35,7 @@ #endif #ifdef PCSCLITE - #define WINSCARDAPI PCSC_API + #define WINSCARDAPI #define WINAPI #define IN #define OUT This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-03-09 14:21:12
|
Revision: 374 http://pyscard.svn.sourceforge.net/pyscard/?rev=374&view=rev Author: ludov Date: 2010-03-09 14:21:05 +0000 (Tue, 09 Mar 2010) Log Message: ----------- winscard_init(): do not set the lib as initialized before the end of the initialization. This caused problems in a multi-threaded application. Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.c Modified: trunk/pyscard/src/smartcard/scard/winscarddll.c =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-02-12 08:28:51 UTC (rev 373) +++ trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-03-09 14:21:05 UTC (rev 374) @@ -677,7 +677,6 @@ if( bFirstCall ) { - bFirstCall=FALSE; dlerror(); handle = dlopen( lib, RTLD_NOW ); if( NULL!=handle ) @@ -733,6 +732,7 @@ printf( "Failed to dlopen %s: %s!", lib, (dlsym_error==NULL) ? "" : (char*)dlsym_error ); } } + bFirstCall=FALSE; } #endif // PCSCLITE return lRetCode; This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-02-12 08:28:58
|
Revision: 373 http://pyscard.svn.sourceforge.net/pyscard/?rev=373&view=rev Author: ludov Date: 2010-02-12 08:28:51 +0000 (Fri, 12 Feb 2010) Log Message: ----------- fix pep8 E302 expected 2 blank lines, found 1 Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-02-12 08:26:18 UTC (rev 372) +++ trunk/contrib/parseATR/parseATR.py 2010-02-12 08:28:51 UTC (rev 373) @@ -39,6 +39,7 @@ """ return a hex list """ return " ".join(["%02X" % b for b in bytes]) + def normalize(atr): """ transform an ATR in list of integers valid input formats are @@ -58,6 +59,7 @@ atr = map(lambda x: int(x, 16), res) return atr + def int2bin(i, padding=8): """ convert an integer into its binary representation """ b = "" @@ -67,6 +69,7 @@ b = "0" * (padding - len(b)) + b return b + def parseATR(atr_txt): atr_txt = normalize(atr_txt) atr = {} @@ -131,6 +134,7 @@ return atr + def TA1(v): Fi = (372, 372, 558, 744, 1116, 1488, 1860, "RFU", "RFU", 512, 768, 1024, 1536, 2048, "RFU", "RFU") Di = ("RFU", 1, 2, 4, 8, 16, 32, "RFU", 12, 20, "RFU", "RFU", "RFU", "RFU", "RFU", "RFU") @@ -147,6 +151,7 @@ return text + def TA2(v): F = v >> 4 D = v & 0xF @@ -163,12 +168,15 @@ return ''.join(text) + def TA3(v): return TAn(3, v) + def TA4(v): return TAn(4, v) + def TAn(i, v): XI = ("not supported", "state L", "state H", "no preference") if (T == 1): @@ -192,6 +200,7 @@ text = "Clock stop: %s - Class accepted by the card: %s" % (XI[F], ''.join(Class)) return text + def TB1(v): I = v >> 5 PI = v & 0x1F @@ -201,6 +210,7 @@ text = "Programming Param P: %d Volts, I: %d milliamperes" % (PI, I) return text + def TB2(v): text = ["Programming param PI2 (PI1 should be ignored): %d" % v, ] if ((v > 49) or (v < 251)): @@ -209,12 +219,15 @@ text.append(" is RFU") return ''.join(text) + def TB3(v): return TBn(3, v) + def TB4(v): return TBn(4, v) + def TBn(i, v): text = "Undocumented" if (T == 1): @@ -236,21 +249,26 @@ text = texts.get(v, "RFU") return text + def TC1(v): text = ["Extra guard time: %d" % v] if (v == 255): text.append(" (special value)") return ''.join(text) + def TC2(v): return "Work waiting time: 960 x %d x (Fi/F)" % v + def TC3(v): return TCn(3, v) + def TC4(v): return TCn(4, v) + def TCn(i, v): text = [] if (T == 1): @@ -264,18 +282,23 @@ text.append("RFU") return ''.join(text) + def TD1(v): return TDn(1, v) + def TD2(v): return TDn(2, v) + def TD3(v): return TDn(3, v) + def TD4(v): return TDn(4, v) + def TDn(i, v): global T Y = v >> 4 @@ -283,6 +306,7 @@ text = "Y(i+1) = b%s, Protocol T=%d" % (int2bin(Y, 4), T) return text + def life_cycle_status(lcs): # Table 13 - Life cycle status byte # ISO 7816-4:2004, page 21 @@ -306,6 +330,7 @@ return text + def data_coding(dc): # Table 87 - Second software function table (data coding byte) # ISO 7816-4:2004, page 60 @@ -329,6 +354,7 @@ return ''.join(text) + def selection_methods(sm): # Table 86 - First software function table (selection methods) # ISO 7816-4:2004, page 60 @@ -360,6 +386,7 @@ return ''.join(text) + def selection_mode(sm): # Table 87 - Second software function table (data coding byte) # ISO 7816-4:2004, page 60 @@ -391,6 +418,7 @@ return ''.join(text) + def command_chaining(cc): # Table 88 - Third software function table (command chaining, length fields and logical channels) # ISO 7816-4:2004, page 61 @@ -413,6 +441,7 @@ return ''.join(text) + def card_service(cs): # Table 85 - Card service data byte # ISO 7816-4:2004, page 59 @@ -448,6 +477,7 @@ return ''.join(text) + def compact_tlv(historical_bytes): text = "" tlv = historical_bytes.pop(0) @@ -554,6 +584,7 @@ return ''.join(text) + def analyse_histrorical_bytes(historical_bytes): text = [] @@ -602,6 +633,7 @@ return text + def compute_tck(atr): # do not include TS byte s = atr["atr"][0] @@ -611,6 +643,7 @@ s ^= atr["atr"][-1] return s + def colorize_txt(l): magenta = "\033[35m" normal = "\033[0m" @@ -619,6 +652,7 @@ text += " --> " + magenta + "".join(l[1:]) + normal return text + def atr_display_txt(atr): return atr_display(atr, colorize_txt) @@ -630,6 +664,7 @@ "<": "<", } + def html_escape(text): """Produce entities within text.""" L = [] @@ -637,6 +672,7 @@ L.append(html_escape_table.get(c, c)) return "".join(L) + def colorize_html(l): text = '<span class="left">' + html_escape(l[0]) + '</span>' if len(l) > 1: @@ -645,9 +681,11 @@ text = l[0] return text + def atr_display_html(atr): return atr_display(atr, colorize_html) + def atr_display(atr, colorize): text = [] TS = {0x3B: "Direct Convention", 0x3F: "Inverse Convention"} @@ -690,6 +728,7 @@ return "\n".join([colorize(t) for t in text]) + def match_atr(atr, atr_file="smartcard_list.txt"): """ try to find card description for a given ATR """ card = [] This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-02-12 08:26:25
|
Revision: 372 http://pyscard.svn.sourceforge.net/pyscard/?rev=372&view=rev Author: ludov Date: 2010-02-12 08:26:18 +0000 (Fri, 12 Feb 2010) Log Message: ----------- Add TBi (i>2) parsing according to ETSI TS 102 221 V8.3.0 (2009-08) Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-02-11 19:52:47 UTC (rev 371) +++ trunk/contrib/parseATR/parseATR.py 2010-02-12 08:26:18 UTC (rev 372) @@ -216,14 +216,24 @@ return TBn(4, v) def TBn(i, v): - text = "" + text = "Undocumented" if (T == 1): BWI = v >> 4 CWI = v % 16 text = "Block Waiting Integer: %d - Character Waiting Integer: %d" % (BWI, CWI) else: - text = "BWI defined only for T=1. Invalid ATR?" + if (i > 2 and T == 15): + # see ETSI TS 102 221 V8.3.0 (2009-08) + # Smart Cards; UICC-Terminal interface; + # Physical and logical characteristics (Release 8) + texts = {0x00: "No additional global interface parameters supported", + 0x88: "Secure Channel supported as defined in TS 102 484", + 0x8C: "Secured APDU - Platform to Platform required as defined in TS 102 484", + 0x90: "Low Impedance drivers and protocol available on the I/O line available (see clause 7.2.1)", + 0xA0: "UICC-CLF interface supported as defined in TS 102 613", + 0xC0: "Inter-Chip USB UICC-Terminal interface supported as defined in TS 102 600"} + text = texts.get(v, "RFU") return text def TC1(v): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-02-11 19:53:16
|
Revision: 371 http://pyscard.svn.sourceforge.net/pyscard/?rev=371&view=rev Author: ludov Date: 2010-02-11 19:52:47 +0000 (Thu, 11 Feb 2010) Log Message: ----------- TBi = BWI defined only for T=1. Invalid ATR? Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2010-02-05 21:11:26 UTC (rev 370) +++ trunk/contrib/parseATR/parseATR.py 2010-02-11 19:52:47 UTC (rev 371) @@ -222,6 +222,8 @@ CWI = v % 16 text = "Block Waiting Integer: %d - Character Waiting Integer: %d" % (BWI, CWI) + else: + text = "BWI defined only for T=1. Invalid ATR?" return text def TC1(v): This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-02-05 21:11:32
|
Revision: 370 http://pyscard.svn.sourceforge.net/pyscard/?rev=370&view=rev Author: ludov Date: 2010-02-05 21:11:26 +0000 (Fri, 05 Feb 2010) Log Message: ----------- Fix pep8 E231 missing whitespace after ',' Modified Paths: -------------- trunk/pyscard/src/smartcard/CardNames.py trunk/pyscard/src/smartcard/Examples/framework/sample_ATR.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/readerviewer/readerviewer.py Modified: trunk/pyscard/src/smartcard/CardNames.py =================================================================== --- trunk/pyscard/src/smartcard/CardNames.py 2010-02-05 20:10:23 UTC (rev 369) +++ trunk/pyscard/src/smartcard/CardNames.py 2010-02-05 21:11:26 UTC (rev 370) @@ -62,11 +62,11 @@ pass def dump( self ): - for k,v in self.db.iteritems(): + for k, v in self.db.iteritems(): print k, `loads(v)` def find( self, atr, reader=None ): - for k,v in self.db.iteritems(): + for k, v in self.db.iteritems(): if loads(v).matches( atr, reader ): return k Modified: trunk/pyscard/src/smartcard/Examples/framework/sample_ATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/framework/sample_ATR.py 2010-02-05 20:10:23 UTC (rev 369) +++ trunk/pyscard/src/smartcard/Examples/framework/sample_ATR.py 2010-02-05 21:11:26 UTC (rev 370) @@ -27,7 +27,8 @@ from smartcard.util import toHexString atr = ATR([0x3B, 0x9E, 0x95, 0x80, 0x1F, 0xC3, 0x80, 0x31, 0xA0, 0x73, - 0xBE, 0x21, 0x13, 0x67, 0x29, 0x02, 0x01, 0x01, 0x81,0xCD,0xB9] ) + 0xBE, 0x21, 0x13, 0x67, 0x29, 0x02, 0x01, 0x01, 0x81, + 0xCD, 0xB9] ) print atr print 'historical bytes: ', toHexString( atr.getHistoricalBytes() ) Modified: trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py 2010-02-05 20:10:23 UTC (rev 369) +++ trunk/pyscard/src/smartcard/Examples/wx/apdumanager/apdumanager.py 2010-02-05 21:11:26 UTC (rev 370) @@ -35,7 +35,7 @@ apppanel=SampleAPDUManagerPanel, appstyle=TR_SMARTCARD | TR_READER | PANEL_APDUTRACER, appicon=os.path.join( os.path.dirname( __file__ ), 'images', 'mysmartcard.ico' ), - size=(800,600) ) + size=(800, 600) ) app.MainLoop() if __name__ == "__main__": Modified: trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py 2010-02-05 20:10:23 UTC (rev 369) +++ trunk/pyscard/src/smartcard/Examples/wx/cardmonitor/cardmonitor.py 2010-02-05 21:11:26 UTC (rev 370) @@ -91,7 +91,7 @@ apppanel=SamplePanel, appstyle=TR_SMARTCARD | TR_READER, appicon=os.path.join( os.path.dirname( __file__ ), 'images', 'mysmartcard.ico' ), - size=(800,600) ) + size=(800, 600) ) app.MainLoop() if __name__ == "__main__": Modified: trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py 2010-02-05 20:10:23 UTC (rev 369) +++ trunk/pyscard/src/smartcard/Examples/wx/readerviewer/readerviewer.py 2010-02-05 21:11:26 UTC (rev 370) @@ -32,7 +32,7 @@ apppanel=None, appstyle=TR_READER, appicon=os.path.join( os.path.dirname( __file__ ), 'images', 'readerviewer.ico' ), - size=(800,600) ) + size=(800, 600) ) app.MainLoop() if __name__ == "__main__": This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-02-05 20:10:30
|
Revision: 369 http://pyscard.svn.sourceforge.net/pyscard/?rev=369&view=rev Author: ludov Date: 2010-02-05 20:10:23 +0000 (Fri, 05 Feb 2010) Log Message: ----------- use SCARD_S_SUCCESS instead of 0 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-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_control.py 2010-02-05 20:10:23 UTC (rev 369) @@ -30,13 +30,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -50,7 +50,7 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_T0 ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol @@ -75,7 +75,7 @@ print 'Control:', r finally: hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getATR.py 2010-02-05 20:10:23 UTC (rev 369) @@ -29,13 +29,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) if len(readers)<1: raise Exception('No smart card readers') @@ -46,7 +46,7 @@ hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: print 'Unable to connect: ' + SCardGetErrorMessage(hresult) else: @@ -54,7 +54,7 @@ try: hresult, reader, state, protocol, atr = SCardStatus( hcard ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: print 'failed to get status: ' + SCardGetErrorMessage(hresult) print 'Reader:', reader print 'State:', state @@ -63,14 +63,14 @@ finally: hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: print 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getAttrib.py 2010-02-05 20:10:23 UTC (rev 369) @@ -92,13 +92,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Faile to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -109,7 +109,7 @@ for reader in readers: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, reader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: print error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) else: @@ -118,7 +118,7 @@ try: for i in attributes.keys(): hresult, attrib = SCardGetAttrib( hcard, i ) - if hresult==0: + if hresult==SCARD_S_SUCCESS: printAttribute( i, attrib ) else: print '-----------------', attributes[i], '-----------------' @@ -126,13 +126,13 @@ finally: hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_getStatusChange.py 2010-02-05 20:10:23 UTC (rev 369) @@ -59,13 +59,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -88,7 +88,7 @@ finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listCards.py 2010-02-05 20:10:23 UTC (rev 369) @@ -31,34 +31,34 @@ slbCryptoFlex8kv2ATR = [ 0x3B, 0x95, 0x15, 0x40, 0x00, 0x68, 0x01, 0x02, 0x00, 0x00 ] try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, card = SCardListCards( hcontext, slbCryptoFlex8kv2ATR, [] ) - if hresult!=0: + 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!=0: + 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==0: + if hresult==SCARD_S_SUCCESS: print i, 'Primary provider:', providername hresult, providername = SCardGetCardTypeProviderName( hcontext, i, SCARD_PROVIDER_CSP ) - if hresult==0: + if hresult==SCARD_S_SUCCESS: print i, 'CSP Provider:', providername finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_listInterfaces.py 2010-02-05 20:10:23 UTC (rev 369) @@ -38,7 +38,7 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise scard.error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' @@ -46,7 +46,7 @@ # list interfaces for a known card hresult, interfaces = SCardListInterfaces( hcontext, 'Schlumberger Cryptoflex 8k v2' ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise scard.error, 'Failed to list interfaces: ' + SCardGetErrorMessage(hresult) print 'Interfaces for Schlumberger Cryptoflex 8k v2:', interfaces @@ -55,25 +55,25 @@ print 'Introducing card ' + znewcardName hresult = SCardIntroduceCardType( hcontext, znewcardName, znewcardPrimGuid, znewcardPrimGuid + znewcardSecGuid, znewcardATR, znewcardMask ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to introduce card type: ' + SCardGetErrorMessage(hresult) # list card interfaces hresult, interfaces = SCardListInterfaces( hcontext, znewcardName ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to remove card type: ' + SCardGetErrorMessage(hresult) finally: hresult2 = SCardReleaseContext( hcontext ) - if hresult2!=0: + if hresult2!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_locateCards.py 2010-02-05 20:10:23 UTC (rev 369) @@ -34,13 +34,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise scard.error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise scard.error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -49,14 +49,14 @@ print 'Introducing card ' + znewcardName hresult = SCardIntroduceCardType( hcontext, znewcardName, [], [], znewcardATR, znewcardMask ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failure to list cards' print 'Cards:', cards @@ -99,7 +99,7 @@ finally: hresult = SCardForgetCardType( hcontext, znewcardName ) hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_pinpad.py 2010-02-05 20:10:23 UTC (rev 369) @@ -61,13 +61,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -81,7 +81,7 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_DIRECT, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol @@ -101,7 +101,7 @@ print 'Control:', r finally: hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readerGroups.py 2010-02-05 20:10:23 UTC (rev 369) @@ -30,83 +30,83 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to list reader groups: ' + SCardGetErrorMessage(hresult) print 'PCSC Reader groups:', readerGroups if 'winscard'==resourceManager: hresult = SCardIntroduceReaderGroup( hcontext, newgroup ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to introduce reader: ' + dummyreader + ' : ' + SCardGetErrorMessage(hresult) hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to add reader to group: ' + SCardGetErrorMessage(hresult) hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=0: + 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!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to remove reader from group: ' + SCardGetErrorMessage(hresult) hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Unable to forget reader group: ' + SCardGetErrorMessage(hresult) hresult = SCardForgetReader( hcontext, dummyreader ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to forget readers ' + SCardGetErrorMessage(hresult) hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + 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!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_readers.py 2010-02-05 20:10:23 UTC (rev 369) @@ -28,24 +28,24 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers hresult, readerGroups = SCardListReaderGroups( hcontext ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_selectDFTelecom.py 2010-02-05 20:10:23 UTC (rev 369) @@ -33,13 +33,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context : ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -53,22 +53,22 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1 ) - if hresult!=0: + 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!=0: + 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!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' @@ -77,7 +77,7 @@ finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' Modified: trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py =================================================================== --- trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-01-21 14:34:40 UTC (rev 368) +++ trunk/pyscard/src/smartcard/Examples/scard-api/sample_transaction.py 2010-02-05 20:10:23 UTC (rev 369) @@ -29,13 +29,13 @@ try: hresult, hcontext = SCardEstablishContext( SCARD_SCOPE_USER ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to establish context: ' + SCardGetErrorMessage(hresult) print 'Context established!' try: hresult, readers = SCardListReaders( hcontext, [] ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'Failed to list readers:: ' + SCardGetErrorMessage(hresult) print 'PCSC Readers:', readers @@ -48,18 +48,18 @@ try: hresult, hcard, dwActiveProtocol = SCardConnect( hcontext, zreader, SCARD_SHARE_SHARED, SCARD_PROTOCOL_T0 | SCARD_PROTOCOL_T1) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'unable to connect: ' + SCardGetErrorMessage(hresult) print 'Connected with active protocol', dwActiveProtocol try: hresult = SCardBeginTransaction( hcard ) - if hresult!=0: + 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!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'failed to get status: ' + SCardGetErrorMessage(hresult) print 'ATR:', for i in xrange(len(atr)): @@ -68,12 +68,12 @@ finally: hresult = SCardEndTransaction( hcard, SCARD_LEAVE_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'failed to end transaction: ' + SCardGetErrorMessage(hresult) print 'Transaction ended' hresult = SCardDisconnect( hcard, SCARD_UNPOWER_CARD ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'failed to disconnect: ' + SCardGetErrorMessage(hresult) print 'Disconnected' except error, (message): @@ -81,7 +81,7 @@ finally: hresult = SCardReleaseContext( hcontext ) - if hresult!=0: + if hresult!=SCARD_S_SUCCESS: raise error, 'failed to release context: ' + SCardGetErrorMessage(hresult) print 'Released context.' This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-01-21 14:35:15
|
Revision: 368 http://pyscard.svn.sourceforge.net/pyscard/?rev=368&view=rev Author: ludov Date: 2010-01-21 14:34:40 +0000 (Thu, 21 Jan 2010) Log Message: ----------- connect() now have a new optionnal parameter disposition= passed to SCardDisconnect(). The default value is SCARD_UNPOWER_CARD as before. It is now possible to disconnect from a card without resetting the card using disposition=SCARD_LEAVE_CARD Modified Paths: -------------- trunk/pyscard/src/smartcard/CardConnectionDecorator.py trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py Modified: trunk/pyscard/src/smartcard/CardConnectionDecorator.py =================================================================== --- trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2010-01-02 20:56:18 UTC (rev 367) +++ trunk/pyscard/src/smartcard/CardConnectionDecorator.py 2010-01-21 14:34:40 UTC (rev 368) @@ -48,9 +48,9 @@ """call inner component deleteObserver""" self.component.deleteObserver( observer ) - def connect( self, protocol=None, mode=None ): + def connect( self, protocol=None, mode=None, disposition=None ): """call inner component connect""" - self.component.connect( protocol, mode ) + self.component.connect( protocol, mode, disposition ) def disconnect( self ): """call inner component disconnect""" Modified: trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py =================================================================== --- trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2010-01-02 20:56:18 UTC (rev 367) +++ trunk/pyscard/src/smartcard/pcsc/PCSCCardConnection.py 2010-01-21 14:34:40 UTC (rev 368) @@ -82,7 +82,7 @@ raise CardConnectionException( 'Failed to release context: ' + SCardGetErrorMessage(hresult) ) CardConnection.__del__( self ) - def connect( self, protocol=None, mode=None ): + def connect( self, protocol=None, mode=None, disposition=None ): """Connect to the card. If protocol is not specified, connect with the default connection protocol. @@ -95,6 +95,12 @@ if mode==None: mode = SCARD_SHARE_SHARED + + # store the way to dispose the card + if disposition==None: + disposition = SCARD_UNPOWER_CARD + self.disposition = disposition + hresult, self.hcard, dwActiveProtocol = SCardConnect( self.hcontext, str(self.reader), mode, pcscprotocol ) if hresult!=0: @@ -121,7 +127,7 @@ except TypeError: pass if None!=self.hcard: - hresult = SCardDisconnect( self.hcard, SCARD_UNPOWER_CARD ) + hresult = SCardDisconnect( self.hcard, self.disposition ) if hresult!=0: raise CardConnectionException( 'Failed to disconnect: ' + SCardGetErrorMessage(hresult) ) self.hcard = None This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2010-01-02 20:56:24
|
Revision: 367 http://pyscard.svn.sourceforge.net/pyscard/?rev=367&view=rev Author: ludov Date: 2010-01-02 20:56:18 +0000 (Sat, 02 Jan 2010) Log Message: ----------- spelling error: Unkown -> Unknown Modified Paths: -------------- trunk/pyscard/src/smartcard/scard/winscarddll.c Modified: trunk/pyscard/src/smartcard/scard/winscarddll.c =================================================================== --- trunk/pyscard/src/smartcard/scard/winscarddll.c 2009-12-31 10:48:12 UTC (rev 366) +++ trunk/pyscard/src/smartcard/scard/winscarddll.c 2010-01-02 20:56:18 UTC (rev 367) @@ -414,7 +414,7 @@ strncpy( strError, "Service was stopped.", sizeof( strError ) ); break; default: - snprintf(strError, sizeof(strError)-1, "Unkown error: %ld, 0x%08lx", (long)pcscError, (long unsigned int)pcscError); + snprintf(strError, sizeof(strError)-1, "Unknown error: %ld, 0x%08lx", (long)pcscError, (long unsigned int)pcscError); }; // zero terminates string This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2009-12-31 10:48:19
|
Revision: 366 http://pyscard.svn.sourceforge.net/pyscard/?rev=366&view=rev Author: ludov Date: 2009-12-31 10:48:12 +0000 (Thu, 31 Dec 2009) Log Message: ----------- add missing \n Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2009-12-18 17:14:30 UTC (rev 365) +++ trunk/contrib/parseATR/parseATR.py 2009-12-31 10:48:12 UTC (rev 366) @@ -569,7 +569,7 @@ (lcs, sw1, sw2) = status[:3] text.append(" Mandatory status indicator (3 last bytes)\n") - text.append(" LCS (life card cycle): %d (%s)" % (lcs, life_cycle_status(lcs))) + text.append(" LCS (life card cycle): %d (%s)\n" % (lcs, life_cycle_status(lcs))) text.append(" SW: %02X%02X (%s)" % (sw1, sw2, "")) #Chipcard::PCSC::Card::ISO7816Error("$sw1 $sw2")) elif hb_category == 0x80: This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |
From: <lu...@us...> - 2009-12-18 17:14:37
|
Revision: 365 http://pyscard.svn.sourceforge.net/pyscard/?rev=365&view=rev Author: ludov Date: 2009-12-18 17:14:30 +0000 (Fri, 18 Dec 2009) Log Message: ----------- improve display of "Possibly identified card" list Modified Paths: -------------- trunk/contrib/parseATR/parseATR.py Modified: trunk/contrib/parseATR/parseATR.py =================================================================== --- trunk/contrib/parseATR/parseATR.py 2009-12-15 09:12:05 UTC (rev 364) +++ trunk/contrib/parseATR/parseATR.py 2009-12-18 17:14:30 UTC (rev 365) @@ -712,6 +712,6 @@ card = match_atr(ATR) if card: - print "Possibly identified card:", " ".join(card) + print "Possibly identified card:", "\n\t".join(card) else: print "Unknown card" This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |