ScardEndTransaction ends all the transactions on the card
Hello! There is a bug in OsX implementation of PCSC standard that makes smartcard synchronization not available via the PSCS functions. If we start 2 transcations (SCardBeginTransaction) on a specific card only one call to SCardEndTransaction makes the card available to all the processes, though it is supposed to be available only after the second matching call to SCardEndTransaction (that's the way it behaves on linux and windows). In the attachment you can find a simple code that demonstrates this behavior. You can use this command line to build it: "g++ -framework PCSC -std=c++11 scardTest.cpp". Launch it in two terminals simultaneously. On OsX both processes will reach the "Start me again" output, but on Linux and Windows the second process will wait on ScardConnect function until all the transactions are closed. Best regards Anton Logachev mailto:ALogachev@aktiv-company.ru | www.aktiv-company.ru<http://www.aktiv-company.ru/>
2017-08-07 10:59 GMT+02:00 Логачев Антон <ALogachev@rutoken.ru>:
Hello!
Hello,
There is a bug in OsX implementation of PCSC standard that makes smartcard synchronization not available via the PSCS functions.
If we start 2 transcations (SCardBeginTransaction) on a specific card only one call to SCardEndTransaction makes the card available to all the processes, though it is supposed to be available only after the second matching call to SCardEndTransaction (that’s the way it behaves on linux and windows).
In the attachment you can find a simple code that demonstrates this behavior. You can use this command line to build it: “g++ -framework PCSC -std=c++11 scardTest.cpp”.
Launch it in two terminals simultaneously. On OsX both processes will reach the “Start me again” output, but on Linux and Windows the second process will wait on ScardConnect function until all the transactions are closed.
Thanks for reporting the bug. I reported it at https://bugreport.apple.com/ I also wrote a blog article at https://ludovicrousseau.blogspot.com/2017/08/macos-sierra-bug-pcsc-transacti... I do not work for Apple so I can't tell if/when this bug will be fixed. Regards, -- Dr. Ludovic Rousseau
participants (2)
-
Ludovic Rousseau
-
Логачев Антон