[SmartcardServices-Dev] ScardEndTransaction ends all the transactions on the card

Логачев Антон ALogachev at rutoken.ru
Mon Aug 7 01:59:26 PDT 2017


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 at aktiv-company.ru | www.aktiv-company.ru<http://www.aktiv-company.ru/>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/smartcardservices-dev/attachments/20170807/f88baec8/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: scardTest.cpp
URL: <http://lists.macosforge.org/pipermail/smartcardservices-dev/attachments/20170807/f88baec8/attachment.ksh>

More information about the SmartcardServices-Dev mailing list