Hi!

I am developing an applet, which will enable client to digitally sign
XML document. I want to use Windows and Firefox's Keystore. Windows
Keystore works well, but I am having problems accessing Firefox
keystore on some computers via JSS. I followed instructions on
Mozilla's JSS site in correctly built JSS, NSS and NSPR (WIN95 build,
etc.,). Can you help solve following problems:

1) If you import certificate into Firefox, its location is something
like C:\Documents and Settings\sampleUser\Application Data\Mozilla
\Firefox\Profiles\z8xkwtww.default. Is there any way to ask browser
via Javascript, check Windows registry, ... to get this path. I know I
can say %APPDATA% and then enter Mozilla, Firefox, Profiles dirs, but
there is a problem with hash.default directory.

2) On some computers JSS does not work when Initializing CryptoManager
(see the code and error below). I put all JSS libraries into C:\jssLib
dir and created JSS subdir to put jss4.jar into it and set PATH
library in Windows. If I execute
System.getProperty('java.library.path') the path to C:\jssLib is in
'java.library.path' property. So where is the problem: when I
initialize CryptoManager it fails with following error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: C:\jssLib
\jss4.dll: The specified procedure could not be found
        at java.lang.ClassLoader$NativeLibrary.load(Native Method)
        at java.lang.ClassLoader.loadLibrary0(ClassLoader.java:1803)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1728)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at
org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:
1443)
        at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:
912)
        at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:
885)
        at testdelovanja.Main.test(Main.java:64)
        at testdelovanja.Main.main(Main.java:257)
Java Result: 1

public class Main
{
    public Main()
    {

    }

    public void test(String[] argv) throws Exception
    {

      CryptoManager.initialize("C:\\Documents and Settings\\dleon\
\Application Data\\Mozilla\\Firefox\\Profiles\\z8xkwtwm.default");
      CryptoManager cm = CryptoManager.getInstance();
   ...
   }
}
-- 
dev-tech-crypto mailing list
dev-tech-crypto@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-tech-crypto

Reply via email to