Re: PCSC and WINE

Bruno Jesus <[email protected]>
Newsgroups gmane.comp.lib.muscle
Message-ID <CALF_nUQw0OBMXwUG1EauYmMT09_6BNk-xwWUSH41RZoU4FFU-g@mail.gmail.com>
On Mon, Jul 15, 2013 at 10:10 AM, Dion Houston Sr
<[email protected]> wrote:
> Hi all,
>
> I am interested in adding SmartCard support for WINE to support digitally
> signing documents on the Mac through Windows only software.  It seems the
> most logical way is to ironically use PCSC-Lite to simulate the WINSCARD
> API.

This was already proposed a few times in wine, even full patches were
send. They were not accepted yet but there are still plans to do so.
Take a look for example at these patches:

http://www.winehq.org/pipermail/wine-devel/2011-September/092627.html
http://comments.gmane.org/gmane.comp.emulators.wine.devel/81008


> Since the APIs have the same names, and this is C, my plan is to use
> pointers to functions, load them from the shared library, then use them in
> the equivalent named functions... i.e.
>
> LONG     (*fnSCardEstablishContext) (DWORD, LPCVOID, LPCVOID,
> LPSCARDCONTEXT);
> fnSCardEstablishContext = dlsym(lib_handle, "SCardEstablishContext");
>
> LONG SCardEstablishContext(...)
> {
>     return fnSCardEstablishContext(...)
> }
>
> I found a blog post from 2010 that describes well the differences between
> the Windows and Linux/OSX implementations:
>
> http://ludovicrousseau.blogspot.com/2010/04/pcsc-sample-in-c.html
>
> So here are the questions:
>
> - Has anyone already done this?  I've looked in the WINE source tree, and
> the source for WINSCARD.DLL appears to just contact stubs.
> - Anyone see any caveats / better ways of doing this?  Specifically I'm
> writing this to work for the Mac, but would like it to be portable.
>
> Thanks in advance - this is my first project for WINE, and the first real C
> programming I've done in a while, but it seems like it's doable.
>
> Dion

Bruno

> _______________________________________________
> Muscle mailing list
> [email protected]
> http://lists.musclecard.com/mailman/listinfo/muscle_lists.musclecard.com
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.