Sample code for RMI over SSL
============================

This directory houses sample RMI programs using custom SSL sockets.

Contents
--------

  README          this document
  jcsi/           source code
  classes/        compiled .class files
  Makefile        a Unix Makefile in case re-compilation is necessary
  all.policy      a very permissive policy file suitable for testing
  startregistry   a Unix shell script to start the RMI registry
  rmisslserver    a Unix shell script to run the RMI server
  rmisslclient    a Unix shell script to run the RMI client

Re-compilation
--------------

Compiled classes for the sample programs are included in the classes/
directory for convenience. If re-compilation is necessary (for instance,
if you change the source code), the included Makefile should suffice.

The programs
------------

These sample programs are modelled on those described in the RMI
documentation for JDK 1.2. The client/server pair is one of the simplese
possible, where the client sends a line of text from stdin to the server 
which in turn echos it back to the client.

The three Unix shell scripts startregistry, rmisslserver & rmisslclient
do not require any command-line arguments.

To run this example, make sure the Setup instructions below have been
followed. Then run 

 startregistry,
 rmisslserver,
 rmisslclient

in the prescribed order, and (preferably) in different windows. When
the the client prompt ">" appears, simply type away, ending a line with
a carriage return.

Try changing the jcsi.ssl.debugLevel (valid values 0-3) to a higher level
to see the SSL protocol in action.

(For Windows, convert the Unix shell scripts to .bat files or run the
java commands directly).

Setup
-----

This distribution contains jar files, compiled classes & key files,
sufficient to run both the sample programs in this directory. 

Be sure to follow these instructions:

  0. Make sure you have JDK 1.2 properly set up, and the DSTC provider
     configured (See the top-level README if necessary)

  1. Make a copy of the <jcsi_install_dir>/.jcsi/ sub-directory under
     your home directory.

  2. In the file ssl.properties in <your_home_directory>/.jcsi/, change
     the 'jcsi.ssl.key.dir' entry to point to the full pathname of the
     <your_home_directory>/.jcsi/keys/ directory.

     (for Windows use "\\" as the path separator,
      eg. C:\\WINNT\\Profiles\\Administrator\\.jcsi\\keys)

