智能卡读卡器身份验证OpenSC Firefox MDN

时间:2019-03-21 15:57:53

标签: javascript firefox firefox-webextensions pkcs#11

几天来,我一直在尝试开发一种简单的Web身份验证,例如在站点上登录,但是访问凭据必须是磁卡。

我使用了OpenSC,它通过命令返回卡的输出,一切正常。

https://github.com/OpenSC/OpenSC/wiki

因此,我已根据此链接上的指南附加了.dll文件:

https://github.com/OpenSC/OpenSC/wiki/Installing-OpenSC-PKCS%2311-Module-in-Firefox,-Step-by-Step

如果我现在进入Firefox设置>隐私,我可以看到卡中的内容

enter image description here

所以我创建了一个firefox扩展来管理已加载的模块

像这样:

https://developer.mozilla.org/en-US/docs/Mozilla/Projects/NSS/PKCS11/Module_Installation

但是当我使用以下语法时,在我的.js文件中:

var checking = browser.pkcs11.isModuleInstalled(name_of_my_module //string)

我收到以下错误:

Unable to load module: Error: "no such PKCS#11 module *name_of_my_module*"

有没有人处理过这个组件或使用其他方法来完成我需要的?

谢谢

0 个答案:

没有答案