org.infoglue.cms.security
Class DummySSLSocketFactory
java.lang.Object
javax.net.SocketFactory
javax.net.ssl.SSLSocketFactory
org.infoglue.cms.security.DummySSLSocketFactory
public class DummySSLSocketFactory
- extends javax.net.ssl.SSLSocketFactory
Socket factory for SSL jndi links that returns an SSL socket.
It incorporates a keystore, which must contain the certs used
to authenticate the client.
This code is based on sample code made freely available by author
Spencer W. Thomas on his web site http://hubris.engin.umich.edu/java/
On Wed 24 May, 2000.
Warning
This class relies heavily on an internal, single, static SSLSocketFactory.
multiple objects of this type in fact will use the same internal SSLSocketFactory.
(This is why a single static init() method sets up everything for the entire
class.) The reason for this structure is that JndiSocketFactory is dynmaically
invoked by the jndi connection, and we have no other chance to initialise the
object.
|
Method Summary |
java.net.Socket |
createSocket()
|
java.net.Socket |
createSocket(java.net.InetAddress inaddr,
int i)
|
java.net.Socket |
createSocket(java.net.InetAddress inaddr,
int i,
java.net.InetAddress inaddr1,
int j)
|
java.net.Socket |
createSocket(java.net.Socket socket,
java.lang.String s,
int i,
boolean flag)
|
java.net.Socket |
createSocket(java.lang.String s,
int i)
|
java.net.Socket |
createSocket(java.lang.String s,
int i,
java.net.InetAddress inaddr,
int j)
|
static javax.net.SocketFactory |
getDefault()
|
java.lang.String[] |
getDefaultCipherSuites()
|
java.lang.String[] |
getSupportedCipherSuites()
|
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DummySSLSocketFactory
public DummySSLSocketFactory()
getDefault
public static javax.net.SocketFactory getDefault()
createSocket
public java.net.Socket createSocket()
throws java.io.IOException
- Overrides:
createSocket in class javax.net.SocketFactory
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.net.Socket socket,
java.lang.String s,
int i,
boolean flag)
throws java.io.IOException
- Specified by:
createSocket in class javax.net.ssl.SSLSocketFactory
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.net.InetAddress inaddr,
int i,
java.net.InetAddress inaddr1,
int j)
throws java.io.IOException
- Specified by:
createSocket in class javax.net.SocketFactory
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.net.InetAddress inaddr,
int i)
throws java.io.IOException
- Specified by:
createSocket in class javax.net.SocketFactory
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.lang.String s,
int i,
java.net.InetAddress inaddr,
int j)
throws java.io.IOException
- Specified by:
createSocket in class javax.net.SocketFactory
- Throws:
java.io.IOException
createSocket
public java.net.Socket createSocket(java.lang.String s,
int i)
throws java.io.IOException
- Specified by:
createSocket in class javax.net.SocketFactory
- Throws:
java.io.IOException
getDefaultCipherSuites
public java.lang.String[] getDefaultCipherSuites()
- Specified by:
getDefaultCipherSuites in class javax.net.ssl.SSLSocketFactory
getSupportedCipherSuites
public java.lang.String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites in class javax.net.ssl.SSLSocketFactory
Copyright © 2005 InfoGlue.org All Rights Reserved.