|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.rmi.server.RMISocketFactory | +--de.tu_darmstadt.sp.rmi.RMISecureSocketFactory
Class RMISecureSocketFactory creates secures sockets for RMI connections. It uses SSLeaySockets. Additionaly it adds new functionality which enables the RMI client (caller) or server (calee) to find out each other's identities, security parameters of the connection, etc.
Field Summary | |
protected RMISSLSocketFactory |
clientFactory
the factory for client sockets |
protected RMISSLServerSocketFactory |
serverFactory
the factory for sever sockets |
Constructor Summary | |
RMISecureSocketFactory()
Create a RMISecureSocketFactory which produces
secure sockets obtained from clientFactory and
serverFactory . |
Method Summary | |
java.net.ServerSocket |
createServerSocket(int port)
Return a Server Socket listening on the specified port. |
java.net.Socket |
createSocket(java.lang.String host,
int port)
Return a socket connected to the specified host on the given port. |
static SSLSocket |
getClient()
Return the Socket used by the currnt RMI call. |
static java.security.cert.X509Certificate |
getClientCertificate()
Return the certificate representing the identity of the peer (client,caller) in the current RMI call. |
static java.security.cert.X509Certificate[] |
getClientCertificateChain()
Return the certificate chain used by the peer(client, caller) in the current RMI call. |
static SSLSocket |
getServer()
Return the Socket used by the last RMI call in the current thread. |
static java.security.cert.X509Certificate |
getServerCertificate()
Return the certificate representing the identity of the peer in the last RMI call of the current thread. |
static java.security.cert.X509Certificate[] |
getServerCertificateChain()
Return the certificate chain used by the peer in the last RMI call of the current thread. |
Methods inherited from class java.rmi.server.RMISocketFactory |
getDefaultSocketFactory,
getFailureHandler,
getSocketFactory,
setFailureHandler,
setSocketFactory |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected RMISSLSocketFactory clientFactory
protected RMISSLServerSocketFactory serverFactory
Constructor Detail |
public RMISecureSocketFactory()
RMISecureSocketFactory
which produces
secure sockets obtained from clientFactory
and
serverFactory
. The the default initialisation for the
two factories is RMISSLSocketFactory
, respectively
RMISSLSeverSocketFactory
.
If you want to use other socket types than those produced by
the default factories, you have to subclass this class and
respecify clientFactory
and severFactory
in the subclasse's constructors.
Method Detail |
public java.net.ServerSocket createServerSocket(int port) throws java.io.IOException
RMISSLServerSocket
objects. This may change in
subclasses.public java.net.Socket createSocket(java.lang.String host, int port) throws java.io.IOException
SSLeaySocket
objects. This may
change in subclasses.public static SSLSocket getServer()
public static java.security.cert.X509Certificate[] getServerCertificateChain() throws SSLPeerUnverifiedException
This method is just "syntactic sugar" since the same information can be obtained
from the socket returned by getServer
.
public static java.security.cert.X509Certificate getServerCertificate() throws SSLPeerUnverifiedException
This method is just "syntactic sugar" since the same information can be obtained
from the socket returned by fetRemoteCallSocket
.
public static SSLSocket getClient()
public static java.security.cert.X509Certificate[] getClientCertificateChain() throws SSLPeerUnverifiedException
This method is just "syntactic sugar" since the same information can be obtained
from the socket returned by getClient
.
public static java.security.cert.X509Certificate getClientCertificate() throws SSLPeerUnverifiedException
This method is just "syntactic sugar" since the same information can be obtained
from the socket returned by getClient
.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |