On 2/3/2011 5:19 PM, Andre Zepezauer wrote: >> Its not a straight forward as you might think. Have you tried reading the 135 >> page "Windows Smart Card Minidriver Specification"? >> http://www.microsoft.com/whdc/device/input/smartcard/sc-minidriver.mspx > > At least in so far to get a picture of the workings. And my impression > is, that all the state management of cards is handled by the framework > and thus the reader-driver is only required to do I/O (i.e. send/receive > APDU:s).
Correct. The trick is to pass in the handles provided by the BaseCSP to the lowest level drivers that will be doing the send receive and any other operations the pcsc driver might want to do. For example if the card is withdrawn while a send or receive is being done, the pcsc drivers need to handle it, or report back to cardmod to report en error to the BaseCSP. This all needs to be looked at closer. > > BTW: The main handle in OpenSC is 'sc_pkcs15_card_t' and not > 'sc_context_t'. In fact 'sc_context_t' is really unimportant. But > sc_pkcs15_card_t holds all the operational state the is required to make > things working. Have a look at VENDOR_SPECIFIC, there is only one OpenSC > specific field needed. I was starting for the SVN code that kept track of separate functions. Yes changes could be made in that area. > > -- Douglas E. Engert <deeng...@anl.gov> Argonne National Laboratory 9700 South Cass Avenue Argonne, Illinois 60439 (630) 252-5444 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel