Skip to Main Content

Java Security

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Questions about PKCS11

843811Jul 6 2007 — edited Nov 17 2008
Hi,Everybody,
when I try to access smartcard by pkcs11 ,I got a problem
the exception is :
--Exception in thread "main" java.security.ProviderException: SunPKCS11 requires configuration file argument

and my code :
public class Test {
public static void main(String[] args) {
String strPth = "C:/pkcs11.cfg";
Provider pkcs11Provider =
new sun.security.pkcs11.SunPKCS11(strPth);
Security.addProvider(pkcs11Provider);
System.out.println("success");
}
}
the pkcs11.cfg file :
name = SmartCard
library = C:/windows/system32/drivers/wdpkc.dll

Can anybody help me?
Thanks
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 15 2008
Added on Jul 6 2007
5 comments
1,274 views