2014-09-17 14:48 GMT+02:00 helpcrypto helpcrypto <[email protected]>:
> On Wed, Sep 17, 2014 at 2:34 PM, Sebastien Lorquet <[email protected]>
> wrote:
>>
>> Hello,
>>
>> The evil process might block access to the reader, but in that case, the
>> legitimate process will likely timeout while waiting for the card
>
> Not true if timeout = INFINITE

Then do not use timeout = INFINITE if you want to timeout :-)

> I have seen
>     while(1){
>         SCardConnect(exclusive)...
>     }
> in some smartcard applications. Thats EVIL! xD

Oh. Bad design indeed.


>> > If A dies then the lock will be released automatically. If that does
>> > not occur then it is a bug in pcsc-lite and you should report it.
>
> What locking system are you using? Flock? Mutex?
> Can you link any source where using it? I'm very interested in this!

MSGCleanupClient() (from winscard_svc.c [1]) is called when the client
application closes (intentionally or not) the socket communication
with pcscd.
MSGCleanupClient() then does the cleanup (calls SCardReleaseContext).

Bye

[1] 
http://anonscm.debian.org/viewvc/pcsclite/trunk/PCSC/src/winscard_svc.c?view=markup
line 968

-- 
 Dr. Ludovic Rousseau

_______________________________________________
Pcsclite-muscle mailing list
[email protected]
http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pcsclite-muscle

Reply via email to