RmiJdbc and SSL


Please email any bug reports, comments or suggestions to rmijdbc@objectweb.org


This document - as well as the SSL implementation - was contributed by Douglas Hammond (djhammond@sympatico.ca) in November 2001


INSTALLATION
------------
SSL Support requires JSSE 1.0.2 available at http://java.sun.com/products/jsse/
Include the location of RmiJdbc.jar in you CLASSPATH

eg. CLASSPATH=%CLASSPATH%;\java\RmiJdbc.jar


USE
---
First make sure you have your certifices working and installed on both client and server

eg.
	Create server keystore

	keytool -genkey -keystore c:\testkeys -keyalg rsa -alias rmijdbc -storepass rmijdbc -keypass rmijdbc

	What is your first and last name?
	  [Unknown]: test
	What is the name of your organizational unit?
	  [Unknown]: test
	What is the name of your organization?
	  [Unknown]: test
	What is the name of your City or Locality?
	  [Unknown]: Brantford
	What is the name of your State or Province?
	  [Unknown]: ON
	What is the two-letter country code for this unit?
	  [Unknown]: CA
	Is  correct?
	  [no]: y



	To export the server certificate from the testkeys keystore. 

	keytool -export -keystore c:\testkeys -alias rmijdbc -file c:\server.cer

	Enter keystore password:  rmijdbc
	Certificate stored in file 


	Use keytool to create a new keystore named testkeysclient an import server.cer

	keytool -import -keystore c:\testkeysclient -alias rmijdbc -file c:\server.cer
	Enter keystore password: rmijdbc
	Owner: CN=enpower, OU=Software Development, O=Toolery.com, L=Chula Vista, ST=CA, C=US
	Issuer: CN=enpower, OU=Software Development, O=Toolery.com, L=Chula Vista, ST=CA, C=US
	Serial number: 3ae5d0fc
	Valid from: Tue Apr 24 12:16:12 PDT 2001 until: Mon Jul 23 12:16:12 PDT 2001
	Certificate fingerprints:
	     MD5: A9:00:67:FF:7A:1B:D4:4A:D5:33:72:97:C5:88:0B:6D
	     SHA1: 16:40:79:8A:11:BC:F8:AE:96:0D:FF:30:46:B5:62:0F:E2:18:56:7F
	Trust this certificate? [no]: y
	Certificate was added to keystore


To run the server in SSL mode with a specific keystore

java -Djavax.net.ssl.keyStore=C:\testkeys -Djavax.net.ssl.keyStorePassword=rmijdbc -Djavax.net.ssl.trustStore=C:\testkeys -Djavax.net.ssl.trustStorePassword=rmijdbc org.objectweb.rmijdbc.RJJdbcServer -ssl

To run the testclient with a specific keystore

	Make sure you have made and setup and ODBC datasource
	named "newtest" with a table named "tb_names"

java -Djavax.net.ssl.keyStore=C:\testkeysclient -Djavax.net.ssl.keyStorePassword=rmijdbc -Djavax.net.ssl.trustStore=C:\testkeysclient -Djavax.net.ssl.trustStorePassword=rmijdbc org.objectweb.rmijdbc.SSLClient