$Id: INSTALL,v 1.5 1999/12/02 07:01:48 ekr Exp $
PureTLS 0.9a2 13-Aug-1999

PureTLS INSTALLATION GUIDE

Firstly, you'll need a JavaVM. Anything over JDK 1.1.7 ought to work,
including JDK 1.2.

PureTLS also depends on Cryptix and the Cryptix ASN.1 kit.
Previously, we provided a built Cryptix because Cryptix 3.0.3
contained several bugs which caused us problems. Those bugs are fixed
in Cryptix 3.1.1. As a consequence, we no longer provide a built
Cryptix, though we do provide a built Cryptix ASN.1 kit.

INSTALLING CRYPTIX
You can get Cryptix-3.1.1 at http://www.cryptix.org/. 

First you need to pick a root directory for the distribution.

We'll call that <ROOT>. 

Unzip the cryptix distribution in <ROOT>. This should
produce a directory called Cryptix.

cd to Cryptix and run
util/build.sh (or build.bat on Windows).

This will build all the classes in <ROOT>/Cryptix/build/classes.

Add this to your CLASSPATH.

INSTALLING THE CRYPTIX ASN.1 KIT
Unpack Cryptix.tar.gz in <ROOT>/build/classes, using 
       	gunzip < Cryptix-asn1.tar.gz | tar xf -
	
This should unpack the requisite source code and classes
into the classes directory.

That's all there is to it.

INSTALLING GNU GETOPT:
Although PureTLS does not require it, the demo programs
in ptls/demo do require GNU Getopt for Java in order
to process the command line options that control them.

You can get a copy at:
	http://www.urbanophile.com/~arenn/hacking/download.html

It's fairly easy to install, and contains directions. 
If you don't install it, the demo programs won't compile,
but the rest of PureTLS will compile and work fine.

INSTALLING PureTLS:
Wherever you unpacked PureTLS, it created a directory called
puretls-0.9b1, which contains, among other things, the
README file. It also contains a subdirectory called src
which contains the source. It also contains
a shell script called 'build.sh'. cd to src.

Execute the build script using
	sh build.sh 
or 	
	build.bat

on Windows
	

This will compile the distribution, assuming that 'javac' is 
in your path. The distribution will build the class files in
the local directories and will also construct a jar file called
puretls.jar in <ROOT>.

RUNNING DEMO PROGRAMS
At this point, you're ready to run the demo programs that come with
PureTLS. In the toplevel directory (the one containing this file),
execute:
	java COM.claymoresystems.ptls.demo.SSLServer -f -D dh1024.pem
the -f tells it to seed the PRNG with zeros for faster startup
(but zero security)
the -D tells it to use dh1024.pem for it's DH params instead of
generating them on the fly.

and in a different shell, execute:
	java COM.claymoresystems.ptls.demo.SSLClient


If all goes well, you should see (in the window in which
you ran SSLClient):
	Cipher suite: TLS_DHE_DSS_WITH_DES_CBC_SHA
	Cert chain
	Issuer C=US,ST=California,O=Claymore Systems, Inc.,CN=Test CA
	Subject C=US,ST=California,O=Claymore Systems, Inc.,CN=Test CA
	Serial 0
	Validity Tue Jun 22 18:07:17 GMT 1999-Thu Jul 22 18:07:17 GMT 1999
	Issuer C=US,ST=California,O=Claymore Systems, Inc.,CN=Test CA
	Subject C=US,ST=California,O=Claymore Systems, Inc.,CN=Test Server
	Serial 6
	Validity Tue Jun 22 18:08:24 GMT 1999-Wed Jun 21 18:08:24 GMT 2000
	HTTP/1.0 200 OK
	Server: PureTLS Demo Server

	Success!

And in the window in which you ran SSLServer:
	Accepted connection

If this doesn't work, you probably got some sort of Exception backtrace.
Send us a copy and we'll try to figure out what's going on.

WHERE TO GO NOW
The next thing you want to do is read the Javadoc, which the build
script drops in the main directory. This should give you enough
information to start coding applications using PureTLS. You should
also look at the demo programs for running examples.

Good luck!




