On Apr 3, 2008, at 2:04 PM, Andreas Jellinghaus wrote:
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 openctshould be fine, and pcsc-lite most likely too.
note: access to a smart card is serial - one request, one answer. samesituation 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.
That's well and good, but the issue isn't so much with well-behaved applications, but with ill-behaved applications or malicious behavior.
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 thecode was never tested for that.
DoD PKI Registration Authorities use two readers and two cards; one with personal credentials used to log into the system, the second with RA credentials to access the CA.
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 twothreads or two processes talk to it. and it could handle everythingserialized - not sure if it is a good idea - or serialize only some accessand would need proper multi-threaded code for the rest anyway. but not sure if anyone will every write something like this.
It's something I've considered--not for me to write, but as a suggestion for future work in the smartcards-on-Linux paper I'm writing.
-- Tim
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel