Am Donnerstag, 3. April 2008 16:25:18 schrieb Timothy J Miller:
> That relates to another question I've had--how session and thread safe
> are all these architectures (PCSC-lite, OpenSC, & OpenCT)?  E.g., if
> I'm driving multiple heads off one Linux box, all with their own
> readers, how easy would it be for session A to use session B's card?

I don't think there is any thread safety in opensc. why would you need it?

not sure, but two different threads should be able to talk to two different 
card readers (and thus cards) without any issue - so on that level openct
should be fine, and pcsc-lite most likely too.

note: access to a smart card is serial - one request, one answer. same 
situation on readers more or less. so if you have several threads, you should 
make sure only one tries to talk to a smart card/reader at the same time.

why anyone would want to use several smart card readers/cards at the same time 
using several threads - no idea. nothing I would try, even if it works the 
code was never tested for that.

something in pkcs#11 talks about multi threadding, IIRC the question is if
you block concurrent access or the library does that itself. but in the end
the multi threaded approach is locking&serialization I guess. on that level
opensc might be multi threaded, but I'm no expert here.

IMHO we have so much trouble with blocking concurrent access by several 
applications, we need a client/server design with the "server" managing the 
card for all applications anyway. then the client lib to talk to the server 
could be safe for multi threaded access - the server won't care much if two 
threads or two processes talk to it. and it could handle everything 
serialized - not sure if it is a good idea - or serialize only some access 
and would need proper multi-threaded code for the rest anyway.
but not sure if anyone will every write something like this.

Regards, Andreas
_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to