On 2/3/2011 3:14 PM, Andre Zepezauer wrote:
> On Thu, 2011-02-03 at 14:04 -0600, Douglas E. Engert wrote:
>> I have updates #321 with a new version of the cardmod patch
>> and would like to start to commit it in pieces.
>>
>> Piece 1 is the attachment I sent on 1/28 as new.martin.patch
>> based on Martin's patch from 1/19. This was the patch that would
>> work for Brian. The main change is adding two parameters to all
>> the *_detect_readers routines.  Martin's patch already required these
>> to be added in a number of places.
>>
>> Is there any objection to adding this patch now?
>
> Yes, why you want to call 'sc_context_create()' altogether. There is not
> much functionality in it. So you could easily implement the required
> initialisation in 'CardAcquireContext()'.

I disagree there is a lot of functionality in it. It main functions is to
read the config files, and other initialization needed by OpenSC, and that
is more then enough to justify calling it.

I am starting from the cardmod code already in SVN  listed as experimental,
which has some bugs, and would not work with login. Having to duplicate
sc_context_create was more then I wanted to do at this time. That could be
another project in the future.

>
> Next point is reader-pcsc.c: Why do you belief that squeezing in a
> second driver namely cardmod is a good idea?

I don't. I am using the code already in SVN that duplicates much of reader-pcsc.
The main difference in the cardmod and pcsc code it to use the handles provided
by the BaseCSP rather then searching for readers and trying to find cards.

> Why not implement a new one?

Yes the code in cardmod code in reader-pcsc.c could be in a separate source 
file,
or could even be added as if statements in the current pcsc code.

> Read the documents provided by Microsoft.

What do you think I have been doing?! How do you think the current cardmod code
was developed?!

> Most things are managed
> by the CSP framework and therefore a reader-cardmod would be straight
> forward consisting mostly of stub functions.
>

That is what the current cardmod.c is trying to do. francois.lebl...@cev-sa.com
has done a nice job of implementing these "stubs" and had cardmod working
for certutil.

But he asked a few weeks ago why would cardmod did not work with login. So I got
interested, I have an environment where I can use a smartcard to login to AD,
and web servers that will accept smartcards for authentication. I have found
a few bugs, and looked closer at how Windows uses it during login.

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

> To make things short: Not calling 'sc_context_create()' and implementing
> a new reader-driver would make your proposal obsolete.
>
> Regards
> Andre
>
>

-- 

  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