[prev in list] [next in list] [prev in thread] [next in thread] 

List:       mozilla-crypto
Subject:    Re: For those interested in Crypto.signtext functionality for Mozilla/ Netscape
From:       "Luca" <luca.fidanza () tin ! it>
Date:       2003-04-18 18:14:31
[Download RAW message or body]

Try this:

http://secclab.mozdev.org/

I'm using this component and I think it's very useful

"Vinil" <vinile@yahoo.com> ha scritto nel messaggio
news:769ccb7a.0304180924.4b8e419a@posting.google.com...
> Hi,
>   Eventhough the function crypto.signtext() is netscape 4.x was a
> really crude one, this is something that we really miss. This was
> something simple which worked for a lot of us. But now that it is
> gone, we need to find alternatives and are working towards it. So lets
> keep this thread and help each other out. Here are the options that I
> have pursued and where I am stuck.
>
>   I do not have environments to compile binaries for the different
> platforms. So platform independence is something important to me
>
>    THere are two options for this. One is using XPCOM javascript with
> XPConnect and the other is using JSS
>
> 1) XPCOM javascript. Looking at the interfaces available in the
> ICMS.idl file, there are enough interfaces available to achieve this
> using script. I am able to iterate through the certificate store and
> pick the certificate that I want to use for signing. Next step is
> getting an interface to nsIHash. I am able to create the component.
>
> try {
>    var hash =
Components.classes["@mozilla.org/nsHash;1"].createInstance();
>    hash = hash.QueryInterface(Components.interfaces.nsIHash);
> } catch(e) {
>    alert("Error = " +e);
> }
>
> In the above function, it throws an error on the QueryInterface call
> possibly because it cannot get the interface. I think this should work
> but for some reason, it does not. Maybe I am not doing this the right
> way and someone can help me.
>
>  2) JSS. I downloaded the JSS 3.3, NSS 3.7 and NSPR 4.2.2 I was able
> to successfully run the test files from the console if I set the path
> to the correct native libraries. But the trouble comes when you have
> to run this from a Java applet. The NSS and NSPR libraries that comes
> with the Netscape 7.02 installation does not work with JSS 3.2 or 3.3.
> In addition, you have to set classpath to include the JSS jar file.
> With XPInstall, I can install the necessary libraries into a directory
> that I choose. But when running an applet, how do I make the JRE point
> to the libraries from that directory first? and also how do I set the
> classpath to include the location to the jss jar file?
> I have the code necessary to obtain the current profile directory from
> javascript which is necessary for the CrytoManager.initialize()
> function.
> If people have got ideas to work around these problem, let us work
> togethter and solve this problem.
>
> My preference is option 1. There is no platform specific code.
> everyting can be done from javascript. With option 2, we will have to
> install platform specific native libraries. Thanks
>
> Vinil



[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic