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.

Is there any PC/SC call to detect if two handles point to the same reader?

I also think tokend is assuming there are no other smartcard drivers
running? With Windows that may not be the case. The detection code in OPenSC
might have some impact on a card in a reader that is not being controlled
by OpenSC if you allow it to still detect readers.

> (used by Tokend) as both
> frameworks actually deal with serving the rest of the platform with a
> single card instance and don't care about OpenSC contexts, number of
> readers or anything similar, just the PKCS#15 layer of objects that
> need to be "translated" to the platform language. Both get discarded
> by the system when the card is removed (well, if the OS X PC/SC layer
> reports the removal of course, opensc-tool -l reports readers even
> after they have been disconnected from USB ;))
>
> Do you have a patch ? :)
>
>

-- 

  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

Reply via email to