On Feb 11, 2011, at 10:06 PM, Douglas E. Engert wrote: > On 2/11/2011 11:43 AM, Martin Paljak wrote: >> >> On Feb 11, 2011, at 6:55 PM, Douglas E. Engert wrote: >>> On 2/11/2011 3:24 AM, Martin Paljak wrote: >>>> On Fri, Feb 4, 2011 at 01:19, Andre Zepezauer >>>> <andre.zepeza...@student.uni-halle.de> wrote: >>>> >>>>> 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. >>>> >>>> This is actually a very good idea. >>>> sc_pkcs15_card_from_handles(hContext, hCard) -> pkcs15_card_t or NULL >>>> is a sensible thing to expose, in pair with >>>> sc_pkcs15_card_from_reader(reader_name) >>> >>> But the reader-pcsc.c is still out there detecting readers. Given a >>> reader_name this may work on Mac. Given a handle on Windows to a reader, >>> one could read the reader name, but if there are multiple readers from the >>> same vendor with the same name how do you tell them apart? Who >>> creates the unique name for the readers on the system? >>> Given a handle do you determine you have found the same reader that >>> the Microsoft BaseCSP said to use. >> >> reader-pcsc.c must detect readers only when asked to do that. >> >> PC/SC subsystem assigns reader names. And two readers from the same >> manufacturer IIRC get index number appended to the end of the name, like >> with pcsc-lite ? >> > > OK then it would be possible to use the BaseCSP provided handle to get > the reader name, then use the reader name to get a new handle > to the same reader. > > That would be a completely different approach for cardmod then what > we have been talking about in other e-mails.
Mis-communication it seems. The handles passed in to the sc_pkcs15_crate_card_from_input_parameters() would be used, of course. No reverse lookups. Just the idea of exposing a "a card or nothing for result" type function instead of requiring the context, connect, bind procedure from the calling application feels so much more logical. -- @MartinPaljak.net +3725156495 _______________________________________________ opensc-devel mailing list opensc-devel@lists.opensc-project.org http://www.opensc-project.org/mailman/listinfo/opensc-devel