The JSSE examples show how a client and a server can use the native iSeries™ JSSE provider to create a context that enables secure communications.
Example: SSL client using an SSLContext object
This example client program utilizes an SSLContext object, which it initializes to use the "MY_CLIENT_APP" application ID. This program will use the native iSeries implementation regardless of what is specified in the java.security file.
Example: SSL server using an SSLContext object
The following server program utilizes an SSLContext object that it initializes with a previously created keystore file. The keystore file has a name of /home/keystore.file and a keystore password of password.
The example program needs the keystore file in order to create an IbmISeriesKeyStore object. The KeyStore object must specify MY_SERVER_APP as the application identifier.
To create the keystore file, you can use the either of the following commands:
java com.ibm.as400.SSLConfiguration -create -keystore /home/keystore.file -storepass password -appid MY_SERVER_APP
For more information about using Java™ commands with Qshell, see Qshell in the iSeries Information Center.
RUNJVA CLASS(com.ibm.as400.SSLConfiguration) PARM('-create' '-keystore' '/home/keystore.file' '-storepass' 'password' '-appid' 'MY_SERVER_APP')