Hi,

I'm facing a problem while getting certificates and private keys from
firefox keystore using SunPKCS#11 and NSS 3.11. My configuration file is:

name=NSS
library=G:\Program Files\Mozilla Firefox\softokn3.dll
description=NSS PKCS11
nssArgs="configdir='G:/Documents and Settings/Administrator/Application
Data/Mozilla/Firefox/Profiles/3aaug6a3.default' certPrefix='' keyPrefix=''
secmod='secmod.db' flags=readOnly"
slot=2

I retrieved the certificates and private keys from firefox using these
configurations and adding provider dynamically it worked for me about 2 to 3
times successfully. I just updated the update of library to someother
location and i'm constantly facing the following exception while getting
certificates and private keys from firefox keystore.

Exception is:

java.security.ProviderException: Initialization failed
        at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:340)
        at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:90)
        at FireFoxCert.main(FireFoxCert.java:74)
Caused by: java.io.IOException: The specified module could not be found.
G:\Program Files\Mozilla Firefox\softokn3.dll

Softokn3.dll is placed at "G:\Program Files\Mozilla Firefox\softokn3.dll"
but exception says its failed to find out the libaray from that location.

Plz correct me if i'm doing wrong with my configurations. Waiting for your
reply...

Thanks in advance.

Regards,

Israr Ahmed



morris.d...@gmail.com wrote:
> 
> Initializing SunPKCS11 for utilization of NSS 3.11.4 capabilities
> yields the following exception:
> 
> java.security.ProviderException: Could not initialize NSS
>       at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:183)
>       at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:90)
>       at test.TripleDESTest.main(TripleDESTest.java:112)
> Caused by: java.io.IOException: The specified version of NSS is
> incompatible, 3.7 or later required
>       at sun.security.pkcs11.Secmod.initialize(Secmod.java:190)
>       at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:179)
>       ... 2 more
> 
> The version I am using is greater than 3.7, despite what the exception
> says. I am looking to use the FIPS 140-2 certified symmetric key
> algorithms in this library.
> 
> I am using the following configuration:
> 
> name = NSScrypto
> attributes = compatibility
> nssLibraryDirectory = ./lib
> nssDbMode = noDb
> nssModule = fips
> 
> I am adding the cryptography provided dynamically with the following
> code:
> 
> String configName = "nss.cfg";
> Provider cryptoProvider = new sun.security.pkcs11.SunPKCS11
> (configName);  // exception occurs on this line
> Security.addProvider(cryptoProvider);
> 
> Has anyone else run into this issue or have any insight into the
> problem?
> 
> If this doesn't work out I will look into direct utilization of JSS.
> 
> Thanks!
> -- 
> dev-tech-crypto mailing list
> dev-tech-crypto@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-crypto
> 
> 

-- 
View this message in context: 
http://old.nabble.com/SunPKCS11-and-NSS-3.11.4-tp26123331p26724674.html
Sent from the Mozilla - Cryptography mailing list archive at Nabble.com.

-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to