Problems using pkcs#11 in sdk1.5
843811Mar 24 2004 — edited Dec 13 2006Hi all,
I'm trying to access one USB token in Java 1.5.
My documentation suport is:
http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html
My 1st step was configuration. I add the line:
security.provider.7=sun.security.pkcs11.SunPKCS11 ${java.home}/lib/security/pkcs11.cfg
to "java.security" file. Where the "pksc11.cfg" contains:
name = rainbow_token
library = c:\winnt\system32\dkck232.dll
Then I try to use the keytool, as described in:
http://java.sun.com/j2se/1.5.0/docs/guide/security/p11guide.html#KeyToolJarSigner
to access the token material. Like this:
c:\>keytool -keystore NONE -storetype PKCS11 -list
The flowing error ocurred:
keytool error: java.security.KeyStoreException: PKCS11 not found
I try, to specify the provider:
keytool -keystore NONE -storetype PKCS11 -providerName SunPKCS11-rainbow_token -list
Still don't work. Error:
keytool error: java.security.NoSuchProviderException: no such provider: SunPKCS11-rainbow_token
Then I make java code to list the providers, and the pkcs#11 provider is listed. :S
I make java code to access the USB token, and I succefull login, but no key material is listed. :(
What could be wrong? Do you recomend me any other documentation? Any sample code, or tutorial?
Please help.
Thanks in advance.