hello,

Can you ensure that your installation has the ".chk" files in the same 
directory as
their corresponding "dlls". meaning libfreebl3.chk  libsoftokn3.chk need 
to be with libfreebl3.dll  libsoftokn3.dll.

http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/tests/
http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/tests/SetupDBs.java
http://mxr.mozilla.org/security/source/security/jss/org/mozilla/jss/tests/FipsTest.java

if you want to do anything in FIPS mode you will need to initialize the 
password.

        CryptoToken tok = cm.getInternalKeyStorageToken();
        tok.initPassword

-glen



Dean wrote:
> Sorry to ask such a simple question, but I have been unable to
> successfully run JSS in FIPs mode.  I am using the binary distribution
> for:
>
> JSS 4.2.5
> NSPR 4.6.4
> NSS 3.11.4
>
> The following (very) simple Java program
>
> import org.mozilla.jss.CryptoManager;
>
>
> public class SimpleTest4 {
>       public static void main(String[] args) throws Exception {
>               System.out.println("Start");
>               CryptoManager.InitializationValues values = new
> CryptoManager.InitializationValues("c:\\test\\db");
>               values.fipsMode =
> CryptoManager.InitializationValues.FIPSMode.ENABLED;
>               CryptoManager.initialize(values);
>               System.out.println("Finish");
>       }
> }
>
> Throws:
>
> Exception in thread "main" java.security.GeneralSecurityException:
> Failed to tog
> gle FIPS mode
>         at org.mozilla.jss.CryptoManager.enableFIPS(Native Method)
>         at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:
> 856)
>         at SimpleTest4.main(SimpleTest4.java:13)
>
> If I remove the values.fipsMode =
> CryptoManager.InitializationValues.FIPSMode.ENABLED; line the program
> executes and creates the 3 db files in c:\test\db.
>
> I have larger pieces of code that all run fine as long as I don't try
> to set FIPSMode.
>
> I'm running with Windows XP.  the jss4.jar file is on the classpath
> and the directories containing the nspr and nss libs are on my path.
>
> Any help would be appreciated.
> _______________________________________________
> dev-tech-crypto mailing list
> dev-tech-crypto@lists.mozilla.org
> https://lists.mozilla.org/listinfo/dev-tech-crypto
>   

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

Reply via email to