hello everybody,
i wanna to develop a little extension for mozilla for creating client
x.509 certificates.
so i thought JSS would be the right solution, but i have problems with
it and there
is no really tutorial.
i tried to get the example ListCert from the website running.

public static void main(String args[]) throws Exception {
    if( args.length != 1 ) {
        System.out.println("Usage: java
org.mozilla.jss.tests.ListCACerts <dbdir>");
        System.exit(1);
        }
         try {
          CryptoManager.initialize(args[0]);
            CryptoManager cm = CryptoManager.getInstance();

            X509Certificate[] certs = cm.getCACerts();
            System.out.println("test2");
            for(int i=0; i < certs.length;   i ) {
             System.out.println(certs[i].getSubjectDN().toString());
               InternalCertificate ic = (InternalCertificate) certs[i];
              System.out.println("SSL: "   ic.getSSLTrust()   ", Email: "
                          ic.getEmailTrust()   ", Object Signing: "
                    ic.getObjectSigningTrust());
            }
        } catch(Throwable e) {
              e.printStackTrace();
              System.exit(1);
        }
         System.exit(0);
    }
}

i can compile it but it dont runs.

my first problem is, that i dont exactly know, what <dbdir> is.
i tried the path to the mozilla cert8.db as argument, but i get the
following errors:

java.lang.UnsatisfiedLinkError: no jss4 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at
org.mozilla.jss.CryptoManager.loadNativeLibraries(CryptoManager.java:1337)
    at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:825)
    at org.mozilla.jss.CryptoManager.initialize(CryptoManager.java:798)
    at list.main(list.java:35)

any ideas?

_________________________________________________________________
Haben Spinnen Ohren? Finden Sie es heraus – mit dem MSN Suche Superquiz via  
http://www.msn-superquiz.de  Jetzt mitmachen und gewinnen!

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

Reply via email to