"Douglas E. Engert" <deeng...@anl.gov> a écrit sur 20/01/2011 00:46:51 :

> [image supprimée] 
> 
> Proposed cardmod patch
> 
> Douglas E. Engert 
> 
> A :
> 
> OpenSC-devel
> 
> 20/01/2011 00:49
> 
> Cc :
> 
> Brian Thomas, François Leblanc
> 
> Attached is a patch to the cardmod code to do the following:
> 
> (1) Fix an uninitialized stricture by  by using calloc
>      in stead of malloc. With out this it was having problems
>      with checking the status on the reader.
> 
> (2) Implement a change that this should work for Brian Thomas
>      that allows one to not detect the reader when creating
>      the sc_context. This uses the
>      SC_CONTEXT_PARAM_DONT_DETECT_READERS flag in the ctx_params
> 
>      (The more I think about this, this should be the default
>      to not detect the readers during the sc_create_ctx, as
>      a flag on opensc.conf could control this instead.)
> 
>    (2) Eliminate the storing of the SCARDCONTEXT and SCARDHANDLE
>      in the registry. Instead, cardmod.c will store them
>      in its VENDOR_SCPECIFIC structure, call sc_context_create
>      with the SC_CONTEXT_PARAM_DONT_DETECT_READERS flag set
>      in the ctx_params. It will then modify the ctx,
>      and then call sc_ctx_detect_readers that will call the
>      cardmod code in reader-pcsc.c that will use the SCARDCONTEXT
>      and SCARDHANDLE.
> 
> I can get this to work in Vista with certutil -SCinfo, but there
> is some issue as is says it can not open the key. I think this
> is an issue with using a 39 character key container name and a
> constant for a serial number.
> 


Probably it's why I need help on how exactly work a minidriver,

the cardmod base is to let us test it and must be improve...



> It does not work with login or runas. This may be the same issue
> with after reading the certificate, it is not registering the
> container so it can be used later.
> 
> The patch is against 0.12.0. and was built on Ubuntu.
> 
> I would hope Brian and François could look this over to see if it
> should be committed.
> 
> 

It's close to the first release I've develop see the start 

http://www.opensc-project.org/pipermail/opensc-devel/2009-October/012610.html

but Martin at this time was not hot to introduce such extra configuration 
on 

context params structure. Martin provide another links to patch 
introducing 

solution using key register...


We discuss about another way to do that and finally I choice one, this not 
perfect

but at least it let us have something to start and see if mini driver can 
working

with opensc.


So it doesn't mind for me the way passing smartcard context and handle to 
pcsc,

if you prefer this way it's ok but I think we lose time since this can be 
change/

improve after successfully develop a complete minidriver functionnal (with 


windows login...)




> -- 
> 
>   Douglas E. Engert  <deeng...@anl.gov>
>   Argonne National Laboratory
>   9700 South Cass Avenue
>   Argonne, Illinois  60439
>   (630) 252-5444
> [pièce jointe "cardmod.20110119.patch.txt" supprimée par Francois 
> LEBLANC/CEV/FR/GCD] 



If I introduce key register to limit witch programs can use cardmod is not

a mistake but a functionnality, saying that it's not correct it's a 
nonsense

after we can discuss about the utility of such functionnality...



Concerning the patch, 

you provide adresses of pcsc context and handle in the structure 
VENDOR_SPECIFIC

module opensc-cardmod32.dll to pcsc reader in module libopensc.dll, I'm 
not sure

that such adresses can be provided betwen dll???



Regards,

François.

 

_______________________________________________
opensc-devel mailing list
opensc-devel@lists.opensc-project.org
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to