Am Mittwoch 03 Februar 2010 12:50:42 schrieb Martin Paljak:
[putting card module in opensc source / tar.gz]
> I'm not sure it would be the best and only option.

so lets discuss alternatives.

> It is not about different versioning or anything similar, it is about
>  packaging and source code organization.
> 
> Consolidating platform components to the opensc svn is good, mungling it
>  down the existing source structure not necessarily so good.

the diffstat is:
 configure.ac                      |   31 
 etc/opensc.conf.in                |   10 
 src/libopensc/Makefile.am         |    6 
 src/libopensc/ctx.c               |    3 
 src/libopensc/internal-winscard.h |    2 
 src/libopensc/internal.h          |    1 
 src/libopensc/opensccm.c          | 1703 
++++++++++++++++++++++++++++++++++++++
 src/libopensc/reader-pcsc.c       |  358 +++++++
 win32/Makefile.am                 |    4 
 win32/opensccm.inf                |  148 +++

and the *.reg file for win32 that is missing (was posted last time).

as far as I can see the modified reader_driver needs to be in libopensc/
and we need the supporting code (configure, internal changes etc.) for it.
so there is litte we can do different.

the inf and reg files are fine in win32/ directory I think.

so the only variable I see is the placement of opensccm.c
(and the name for it - "cardmod.c" is ok for you?).

in my opinion a single source file could be placed in a seperate
directory. and we can either create a seperate dll that contains
this extra code and links opensc-2.dll (or includes it static).

but what is best? the extra directory would be fine with me, not
a big deal. but an extra dll? I would prefer not to have that,
we had already enough trouble with the many dlls we had.

so it looks to me like a single dll (opensc-2.dll) with the
cardmod included is the better idea. and wether we put the
code in an extra directory or not is not a big deal for me,
I'm happy with either solution.

> > as far as I know both are too much involved in opensc internals to port
> > them to pkcs#11 api.
> 
> You have the correct understanding.

ok, thanks.

> The question here is how the "feature" (pre-opened card handles) is
>  implemented inside libopensc. The interface towards BaseCSP is indeed
>  constant, but the implementation inside libopensc should be reviewed a
>  bit, as there have been other (and alternative) implementations. Current
>  reader-pcsc.c copypaste does not look like a long-term solution.

you know that code much better than I do. but didn't the cardmod reader
also share a lot of code with pcsc reader driver? IIRC that was the
argument for keeping it in that file, and not creating a new reader-cardmod.c
file.

what do you suggest should be done? and is it ok to commit the patch now
and work on it, or does it have to be changed before it gets into svn?

> How do I compile it, where do I download the SDK from? That should be
>  documented in the wiki page for example.

he posted some instructions last time. you need the cardmod.h file from
"Microsoft CNG Development Kit" (plattform SDK might contain it as well),
point configure to it, and you are done. to use it use the reg (older windows)
or inf (newer windows) files. These contain code for the Westcos cards
as far as I understand, and need to be extended to handle other cards
as well.

btw: François, do you know if several cards can claim one atr?
in that case we could claim all cards - the user can modify opensc.conf
to remove some drivers, thus opensc will not know the card and hopefully
ignore it / leave it to some other software. or can you have only opensc
or some other software installed, but never both?

Regards, Andreas
_______________________________________________
opensc-devel mailing list
[email protected]
http://www.opensc-project.org/mailman/listinfo/opensc-devel

Reply via email to