|
In your WebSession installation directory you will find two sample programs that demonstrate how to use SSL in your WebSession API applications. DirectSsl.java shows you how to connect your WSDK API program directly to a server that supports SSL. InternalProxy.java shows you how to connect your WSDK API program to a server that is front-ended by an I/O Concepts Server SSL Proxy.
You need to modify these programs before you can run them.
Both sample programs require that you specify a trust store (certificate) file. This file is used by the client program to authenticate the certificate that your SSL server presents.
Sun delivers a standard trust store with the JDK; it is jdk/jre/lib/security/cacerts where jdk is your JDK installation directory. This trust store contains certificates from trusted Certificate Authorities, such as Thawte or Verisign.
Your SSL server is probably using its own certificate, however, so you need to add it to this cacerts file. Here's how to do this.
If you are setting up a test environment you may need to create a self-signed certificate for your server (and then also add it to the cacerts file for your client program). Here's how to do this.
The DirectSsl.java program shows you how to connect your WebSession API program to a server that already supports SSL, as shown at right.
You need to modify this program before you run it. |