[英]PKCS#11 Java - Invalid access to memory location
I'm getting trouble with my PKCS#11 provider. 我的PKCS#11提供程序遇到了麻烦。 Here's my code:
这是我的代码:
String pkcs11ConfigFile = "C:\\pkcs11.cfg";
Provider pkcs11Provider = new sun.security.pkcs11.SunPKCS11(pkcs11ConfigFile);
Security.addProvider(pkcs11Provider);
pkcs11.cfg
file: pkcs11.cfg
文件:
name = SmartCard
library = C:\Program Files\CryptoTech\CryptoCard\CCPkiP11.dll
slot = 3
After running the code, I've got the exception: 运行代码后,我得到了例外:
java.security.ProviderException: Initialization failed at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:340) at sun.security.pkcs11.SunPKCS11.(SunPKCS11.java:86) at signature.NewClass.main(NewClass.java:15) Caused by: java.io.IOException: Invalid access to memory location. C:\Program Files\CryptoTech\CryptoCard\CCPkiP11.dll
PS. PS。 Card reader is connected, card is inserted, slot has proper value..
已连接读卡器,已插入卡,插槽具有适当的值。
Thanks for any help! 谢谢你的帮助!
Sounds like a faulty PKCS#11 module? 听起来像是有问题的PKCS#11模块?
Try to use it through PKCS#11 spy http://www.opensc-project.org/opensc/wiki/UsingOpensc 尝试通过PKCS#11间谍使用它http://www.opensc-project.org/opensc/wiki/UsingOpensc
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.