DXR is a code search and navigation tool aimed at making sense of large projects. It supports full-text and regex searches as well as structural queries.

Mercurial (be6b3af32106)

VCS Links

Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68
<html>
<!-- This Source Code Form is subject to the terms of the Mozilla Public
   - License, v. 2.0. If a copy of the MPL was not distributed with this
   - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
<head>
<title>Netscape Security Services for Java</title>
</head>

<body bgcolor="white" text="black">
<!--font face="sans-serif"-->
<center><h1>Netscape Security Services for Java</h1></center>

Netscape Security Services for Java (JSS) is an interface allowing Java applications
to use the Secure Sockets Layer protocol.  The interface is implemented with the
FIPS-validated Netscape Security Services library.
It consists of a system-dependent dynamic library (<code>libjss.so</code>
on UNIX, <code>jss.dll</code> on Windows) and a ZIP file
(<code>jss.zip</code>) containing system-independent Java classes.
These classes are compatible with JDK 1.1 or later <b>using the native
thread implementation (not green threads)</b>.

<h2>Building Applications with JSS</h2>
To construct Java applications that use JSS, you must:
<ul>
<li>Call the JSS classes from your application.
<li>When compiling your application, put <code>jss.zip</code> in your
<code>CLASSPATH</code>.
<li>When running your application, put <code>libjss.so</code> in your
<code>LD_LIBRARY_PATH</code> (on UNIX) or <code>jss.dll</code>
in your <code>PATH</code> (on Windows), and put
<code>jss.zip</code> in your <code>CLASSPATH</code>.
</ul>

<h2>Programming with JSS</h2>
Before the SSL classes can be used,
<a href="javadoc/org/mozilla/jss/NSSInit.html#initialize(java.lang.String, java.lang.String, java.lang.String)">
<code>NSSInit.initialize</code></a> must be called to open the security
databases and initialize the random number generator.
<a href="javadoc/org/mozilla/jss/NSSInit.html#setPasswordCallback(org.mozilla.jss.util.PasswordCallback)"><code>
NSSInit.setPasswordCallback</code></a> may be called to change the password
callback; the default is to prompt for passwords on the command line.

<p>The files in the <code>examples</code> directory illustrate the use of JSS
in an application:
<dl>
<dt><a href="examples/SSLClient.java">SSLClient.java</a>
<dd>An example of an SSL client application.
<dt><a href="examples/SSLServer.java">SSLServer.java</a>
<dd>An example of an SSL server application.
To run, it requires certificate
and key databases that contain a certificate called "SSLServer".  The sample
<code>cert7.db</code> and <code>key3.db</code> files, also in the
<code>examples</code> directory,
can be used for this purpose. When <code>SSLServer</code> is run,
it will ask for a password
for the "Internal Key Storage Token", which is the key database.
The password for the example <code>key3.db</code> file is "netscape".
</dl>
These classes are in the <code>org.mozilla.jss.ssl</code> package.
The <code>.class</code> files must be put in the subdirectory
<code>org/mozilla/jss/ssl</code> of a <code>CLASSPATH</code> entry
in order to be located by the Java virtual machine.

<a href="javadoc/index.html"><h2>Javadoc for the JSS Classes</h2></a>

<!--/font-->
</body>
</html>