|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Interface Summary | |
RMIServer | Remote interface RMIServer for a primitive RMI server accepting and displaying a message. |
Class Summary | |
RMIClient | Class RMIClient sends a messaga to a RMI server. |
RMIServerImpl | Remote class RMIServerImpl provides services for RMIServer. |
SSLClient | Class SSLClient is a an example on how to set up an SSLeay socket and communicate with a server socket. |
SSLServer | Class SSLServer is a test example showing how to setup the environment, create
and use a SSLeayServerSocket . |
Contains examples for ITISSL usage.
sfindcerts
utility (also provided with
ITISSL) to set up the environment variables CA_FILE, CERT_FILE, and
KEY_FILE.
sslserver is the counterpart of sslclient. It takes only one commandline argument and creates a server socket which accepts one connection. The connection information is displayed. Take a look at the source code (SSLServer.java) to find out how to work with SSLeayServerSockets.
To run the socket communication example, type the following commands:
A WINDOW |
$ echo "..we're in <package_root>"
$ ITISSL_USER_DIR=certs/server bin/sslserver 4567 |
OTHER WINDOW |
$ echo "..we're <package_root>"
$ ITISSL_USER_DIR=certs/client bin/sslclient myhost 4567 "Hello" |
Alternatives to run a test program (here -- sslclient):
CA_FILE=certs/client/ca.pem CERT_FILE=certs/client/cert.pem \ KEY_FILE=certs/client/key.pem sslclient <host> <port> <message>
or
sslclient -Diti.ssl.ca_file=certs/client/ca.pem \ -Diti.ssl.cert_file=certs/client/cert.pem \ -Diti.ssl.key_file=certs/client/key.pem \ bin/sslclient <host> <port> <message>
rmiserver server-name
For every remote call, the connection information (including identity of the clients) is displayed.
The rmiclient is the caller. It is implemented in the
RMIClient.java
program, and accepts two arguments (server-name and message). Its
syntax is:
rmiclient server-name message
Like the server, it displays connection information (including the server's identity). Thus, the RMI test example will look like this:
FIRST WINDOW |
$ echo "..we're in <package_root>"
$ echo "start the normal naming service" $ CLASSPATH=classes rmiregistry & $ echo "start the secure registry" $ ITISSL_USER_DIR=certs/registry bin/srmiregistry |
SECCOND WINDOW |
$ echo "..we're in <package_root>"
$ echo "start the server" $ ITISSL_USER_DIR=certs/client bin/rmiserver testserv |
THIRD WINDOW |
$ echo "..we're in <package_root> .." $ echo "send a message to testserv" $ ITISSL_USER_DIR=certs/client bin/rmiclient testserv "Hello" |
Alternatives to run a test program (here -- rmiclient):
CA_FILE=certs/client/ca.pem CERT_FILE=certs/client/cert.pem \ KEY_FILE=certs/client/key.pem rmiclient <servername> <message>
or
rmiclient -Diti.ssl.ca_file=certs/client/ca.pem \ -Diti.ssl.cert_file=certs/client/cert.pem \ -Diti.ssl.key_file=certs/client/key.pem \ bin/rmiclient <server-name> <message>
Note: The
sfindcerts man
page is important to understand the use of the
ITISSL_USER_DIR
environment variable and how the test
programs work. The test programs use the sfindcerts
utility to find the locations of their certificates.
|
|||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |