C# 中的智能卡 API,对 Linux 友好
我目前有一个在 Windows 中运行的项目,使用 P/Invokes 调用智能卡 API;然而,由于我现在已经开源该项目并将其放在 Google Code 上,因此我有兴趣让它在 Mono 上适用于 Linux。
然而,这样做的障碍是智能卡代码;我对 Linux 下与智能卡交互的熟悉程度为零,谷歌搜索也没有透露任何有启发性的内容。
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.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
我认为 PCSC 就是您正在寻找的。没有使用过它,因为我不必处理 Mono/Linux,尽管我无法向您提供任何有关它的详细信息。
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.
好吧,我找到了答案; PCSC-lite 以兼容的格式实现了整个 WinSCard API,因此我所需要做的就是将一个小的 .exe.config 与程序捆绑在一起,以便 mono 将替换
DllImport
WinSCard.dll 与pcsclite.so.1
在运行时运行,一切都开箱即用。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
forWinSCard.dll
withpcsclite.so.1
at runtime and everything works out of the box.