4

I currently have a project that operates in Windows using P/Invokes to call the Smartcard API; however, since I've now open-sourced the project and put it on Google Code, I'd be interested in making it work for Linux peeps on Mono.

The blockade to doing that however, is the smartcard code; I have absolutely zero familiarity with talking to smartcards under Linux and Google searches haven't revealed anything enlightening.

Olipro
  • 3,489
  • 19
  • 25

2 Answers2

4

Well, I found my answer; PCSC-lite implements the entire WinSCard API in a compatible format, so all I've needed to do is bundle a small .exe.config with the program so that mono will replace the DllImport for WinSCard.dll with pcsclite.so.1 at runtime and everything works out of the box.

Olipro
  • 3,489
  • 19
  • 25
  • Hi Olipro, Can you please elaborate on the .exe.config solution? (If possible, please include some sample code) – Jacques Oct 22 '19 at 13:47
0

I think PCSC is what youre are looking for. Haven't used it because I don't have to deal with Mono/Linux, though I can't give you any details about it.

Jay
  • 2,141
  • 6
  • 26
  • 37
  • I've just looked at the source code and found that it's not cross platform at all; it is also using P/Invoke to WinSCard.dll; no sign of calls to musclecard, so I think this is a WIP that got abandoned. – Olipro Jul 17 '11 at 20:57