This discussion is archived
0 Replies Latest reply: Jan 27, 2012 3:23 AM by 909321 RSS

Problem in Accessing PKCS11 eToken

909321 Newbie
Currently Being Moderated
Hi
I am trying to access StarKey400 USB eToken. I am getting "java.security.ProviderException: Initialization failed" error.
I am getting error in 2nd line.

String configName = "C:/pkcs11.cfg";
Provider p = new sun.security.pkcs11.SunPKCS11(configName); // Error in this line
Security.addProvider(p);
char[] pin = "12345".toCharArray();
KeyStore ks = KeyStore.getInstance("PKCS11");
ks.load(null, pin);

Config File:
name = eToken
library = C:/WINDOWS/system32/R5CoInst.dll

Please Help

ajk

Legend

  • Correct Answers - 10 points
  • Helpful Answers - 5 points