## mx4j.tools.adaptor.rmi
Class SSLRMIClientSocketFactory

    java.lang.Object
      mx4j.tools.adaptor.rmi.SSLRMIClientSocketFactory

All Implemented Interfaces:
  java.rmi.server.RMIClientSocketFactory, java.io.Serializable

public class SSLRMIClientSocketFactory
extends java.lang.Object
implements java.rmi.server.RMIClientSocketFactory, java.io.Serializable

The SSL socket factory for RMI connections.

The implementation relies on SSLSocketFactory.getDefault() that creates a default SSLContext; this context is initialized with a trust store that must contain the certificate of the server, otherwise a javax.net.ssl.SSLException: untrusted server cert chain is thrown. The default trust store is searched in this order

- the file pointed by the javax.net.ssl.trustStore system property
- the file <jdk_home>/lib/security/jssecacerts
- the file <jdk_home>/lib/security/cacerts

So the client normally must have the certificate of the server, and have it in one of the above positions for RMI over SSL to work.

Version:
  $Revision: 1.3 $
See Also:
  Serialized Form

Constructor Summary
`SSLRMIClientSocketFactory()`

Method Summary
`java.net.Socket` `createSocket(java.lang.String host, int port)`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SSLRMIClientSocketFactory

    public SSLRMIClientSocketFactory()

Method Detail

### createSocket

    public java.net.Socket createSocket(java.lang.String host,
                                        int port)
                                 throws java.io.IOException

  Specified by:
    `createSocket` in interface `java.rmi.server.RMIClientSocketFactory`
  Throws:
    `java.io.IOException`

Copyright © 2001-2003 MX4J Team. All Rights Reserved.