I configured NSS 3.12.4 to work with my java program using the SunPKCS11 provider in FIPS mode and everything works fine. Now I follow the steps in https://blogs.oracle.com/meena/entry/what_s_new_in_nss1 so that NSS works as a shared database.
When I configured NSS in shared db mode, the secmod.db file is replaced with pkcs11.txt, as expected. But now SunPKCS11 could not be initialized, because during initialization, there seems to be a check for secmod.db. I also tried the configDir prefix with sql :, but this also does not work.
I get the following exception.
Caused by: java.io.FileNotFoundException: /etc/nss/secmod.db at sun.security.pkcs11.Secmod.initialize(Secmod.java:181) at sun.security.pkcs11.SunPKCS11.<init>(SunPKCS11.java:179)
Has anyone tried using NSS in conjunction with java, or in any way around this problem?
source share