|
WebLogic Server 6.1 Code Examples, BEA Systems, Inc. | |||||
See:
Description
| Class Summary | |
| NulledHostnameVerifier | HostnameVerifier provides a callback mechanism so that implementers of this interface can supply a policy for handling the case where the host that's being connected to and the server name from the certificate SubjectDN must match. |
| NulledTrustManager | Given the partial or complete certificate chain provided by the peer, build a certificate path to a trusted root and return true if it can be validated and is trusted for client SSL authentication. |
| SSLClient | SSLClient is a short example of how to use the SSL library of WebLogic to make outgoing SSL connections. |
| SSLClientServlet | SSLClientServlet is a simple servlet wrapper of examples.security.sslclient.SSLClient |
| SSLSocketClient | SSLSocketClient uses the SSLSocket and SSLSocketFactory directly to use a new SSL connection. |
The SSLClient example is a short example of how to use the SSL library of WebLogic to make out-going SSL connections and the SSLSocketClient example demonstrates using the SSLSocket and the SSLSocketFactory directly to make a new SSL connection.
The SSLCLient example demonstrates how to use the SSL library of WebLogic to make outgoing SSL connections from a stand-alone application as well as from within the WebLogic Server (in a servlet). This example demonstrates:
The SSLSocketClient example demonstrates:
| Additional Resources for examples.security.sslclient.SSLClient and examples.security.sslclient.SSLSocketClient | |
| build.xml | The Java Ant build script assembles and deploys the SSLClient and the SSLSocketClient examples. |
| jsseWLS.bat | A batch file used to run the sslclient example on the Windows 2000 platform using the JSSE API to connect to WebLogic Server. This file includes parameters that specify:
|
| jsseWLS.sh | A batch file used to run the sslclient example on the UNIX platform using the JSSE API to connect to WebLogic Server. For parameters description, see the parameters listed for jsseWLS.bat. |
| wlsWLS.bat | A batch file used to run the sslclient example on the Windows 2000 platform using the
weblogic.net.http.HttpsURLConnection class to make a connection to WebLogic Server. This file includes parameters that specify:
|
| wlsWLS.sh | A batch file used to run the sslclient example on the UNIX platform using the weblogic.net.http.HttpsURLConnection class to make a connection to WebLogic Server. For parameters description, see the parameters listed for wlsWLS.bat. |
The following sections describe how to build and run the SSLClient example.
Before you run this example, you need:
To run the JSSE versions of the SSLClient example, uncomment Java code in sslclient.java and rebuild the file. Information about which lines to uncomment is included in the Java source files for the SSLClient.
An ant build script is available in the samples/examples/security/sslclient directory. Enter the following command to execute the build script:
$ ant
The ant command builds and deploys the files in the sslclient example to the WLS_HOME/config/examplesWebApp/serverclasses directory.
To run the SSLClient with WebLogic Server using the WebLogic Server API, execute the following command
$ wlsWLS.bat
To run the SSLClient with WebLogic Server using the JSSE API, execute the following command
$ jsseWLS.bat
The SSLClient constructs a URL with which to make the connection. First the client will try to connect to the non-secure port (i.e., 7001 on WebLogic Server) on the server and then the client will try to connect using a secure port (i.e., 7002 on WebLogic Server). The response to the connection is displayed on the screen.
The SSLClient displays the following data on the screen or in the browser:
The following sections describe how to build and run the SSLSocketClient example.
Before you run this example, you need:
An ant build script is available in the samples/examples/security/sslclient directory. Enter the following command to execute the build script:
$ ant
The ant command builds and deploys the files in the sslsocketclient example to the WLS_HOME/config/examplesWebApp/serverclasses directory.
To run the SSLSocketClient with WebLogic Server:
to the samples/examples/security/sslclient directory.
$ java examples.security.sslclient.SSLSocketClient hostname SSLPort optionalHostnameVerifierClassName
where:
The SSLSocketClient constructs a new SSLSocket to the hostname listed and will report back whether the connection was successful or not.
The SSLClient displays the following data on the screen or in the browser:
Read more about:
|
Documentation is available at http://e-docs.bea.com/wls/docs61 |
|||||