Anyway softokn3.dll requires these parameters in order to initialize (they specify where the NSS databases should be). I've been meaning to fix this, but it hasn't been a priority at this point. Anyway I've heard that the sun java code knows that softokn requires extra parameters and does have a way to specify them (probably in the pkcs11.config file).
Enzo Motta wrote:
I'm trying to connect to firefox's PKCS#11 implementation using the new sun PKCS#11 Provider.My code looks like: String configName = "c:\\pkcs11.config"; Provider p = new sun.security.pkcs11.SunPKCS11(configName); Security.addProvider(p); My pkcs11.config is: name = Firefox library = C:\Mozilla\softokn3.dll And I always got the error:Exception in thread "main" java.security.ProviderException: Initialization failedat sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:153) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:74) at Main.main(Main.java:15) Caused by: sun.security.pkcs11.wrapper.PKCS11Exception: CKR_ARGUMENTS_BAD at sun.security.pkcs11.wrapper.PKCS11.C_Initialize(Native Method) at sun.security.pkcs11.wrapper.PKCS11.getInstance(PKCS11.java:143) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:103) Does anyone know what is wrong? Or where can I found a solution? Thanks,Enzo Motta._______________________________________________ mozilla-crypto mailing list [email protected] http://mail.mozilla.org/listinfo/mozilla-crypto
smime.p7s
Description: S/MIME Cryptographic Signature
