[Pcsclite-muscle] Bug in reconnecting to a card.

Abraham Macias Paredes amacias at solutia-it.es
Fri Sep 23 12:49:55 UTC 2016


Hi again, 

 After some tests I think that a second “Connect” invalidates the transactions (Python test attached).

 

Or maybe there are a couple of seconds of timeout before invalidating the transactions and allowing the connection (because when you run the test you can notice a couple of seconds of delay before the second “connect”).

 

The output of the test in my Windows 10 is:

 

c:\Python27>python.exe test.py

Context established!

PCSC Readers: ['Dell Smart Card Reader Keyboard 0']

Using reader: Dell Smart Card Reader Keyboard 0

Connected with active protocol 1

Start transaction

Connect again

Connected with active protocol 1

Start transaction (card 2)

End transaction (card 2)

End transaction in the first connection

Exception: failed to end a transaction: Se ha reiniciado la tarjeta inteligente, por lo que no es vßlida ninguna informaci¾n de estado compartido.

Released context.

press Enter to continue

 

Best regards!

 

 

De: Pcsclite-muscle [mailto:pcsclite-muscle-bounces+amacias=solutia-it.es at lists.alioth.debian.org] En nombre de Abraham Macias Paredes
Enviado el: viernes, 23 de septiembre de 2016 13:31
Para: 'Talks about MUSCLE' <pcsclite-muscle at lists.alioth.debian.org>
Asunto: Re: [Pcsclite-muscle] Bug in reconnecting to a card.

 

Hi,

*         Do you get the same behavior on Windows?
No, in Windows seems that “disconnect” and “reconnect” ends all started transactions.

*         What should be the correct behavior of pcsc-lite?
I think that is logical to think that when you “reconnect” or “disconnect” a card, all estarted transactions are ended.

Thank you and best regards!

 

 

De: Pcsclite-muscle [mailto:pcsclite-muscle-bounces+amacias=solutia-it.es at lists.alioth.debian.org] En nombre de Ludovic Rousseau
Enviado el: viernes, 23 de septiembre de 2016 12:54
Para: Talks about MUSCLE <pcsclite-muscle at lists.alioth.debian.org <mailto:pcsclite-muscle at lists.alioth.debian.org> >
Asunto: Re: [Pcsclite-muscle] Bug in reconnecting to a card.

 

2016-09-23 12:45 GMT+02:00 Abraham Macias Paredes <amacias at solutia-it.es <mailto:amacias at solutia-it.es> >:

Hi PCSC lite Project people,

 

Hello,
 

  I’m developing a software that nowadays is not stable (my software is buggy), but I detected that a bug in my software causes a bug in pcsc-lite.

 

The “SCardReconnect” doesn’t check if the connection has a transaction opened. So if you open a transtaction and reconnects the transaction is still opened. And also you can open a new transaction. 

 

Interesting.

Do you get the same behavior on Windows?

What should be the correct behavior of pcsc-lite?

Bye

 

-- 

 Dr. Ludovic Rousseau

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20160923/c2aa5252/attachment.html>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: test.py
URL: <http://lists.alioth.debian.org/pipermail/pcsclite-muscle/attachments/20160923/c2aa5252/attachment.ksh>


More information about the Pcsclite-muscle mailing list