I have some questions about the cardmod mini-driver
in OpenSC 0.12.0

It appears that the code in CardAcquireContext is trying to
store in the registry two handles, pcsc_ctx and pcscd_card
in the HKEY_LOCAL_MACHINE, "SOFTWARE\\OpenSC Project\\Opensc"

Using the registry for this does not look correct for a
number of reasons:

(1) there maybe multiple mini-drivers being run at the same
     time.

(2) The location in the registry can only be written be the system,
     yet the min-driver may be called as a user.

(3) The DLLMain routine attempts to see if the key is readable
     but is called before the CardAcquireContext can create
     the key.

(4) I don't see how the pcsc_ctx or pcscd_card can ever be changed.

I have not done much with mini-drivers, but have made changes to a
number of CSPs and using the registry looks wrong.

I would suggest that some other way to store this data is needed,
by the cardmod_detect_readers in reader-pcsc.c

In addition to these issues, the debugging in logprintf depends
on opensc which is way to later in the process to catch errors
like the above.

I built the opensc-cardmod32.dll on Ubuntu using mingw and was
testing on Vista as a local admin running:
  runas /netonly /smartcard /user:xxx@yyy cmd.exe



-- 

  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