org.apache.tomcat.util.net.jsse
Class JSSESocketFactory
- Cloneable
public abstract class JSSESocketFactory
SSL server socket factory. It _requires_ a valid RSA key and
JSSE.
- Harish Prabandham
- Costin Manolache
- Stefan Freyr Stefansson
- EKR -- renamed to JSSESocketFactory
Socket | acceptSocket(ServerSocket socket) - Wrapper function for accept().
|
protected void | configureClientAuth(SSLServerSocket socket) - Configure Client authentication for this version of JSSE.
|
protected void | configureClientAuth(SSLSocket socket) - Configure Client authentication for this version of JSSE.
|
ServerSocket | createSocket(int port) - Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port.
|
ServerSocket | createSocket(int port, int backlog) - Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog.
|
ServerSocket | createSocket(int port, int backlog, InetAddress ifAddress) - Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog.
|
protected String[] | getEnabledCiphers(String requestedCiphers, String[] supportedCiphers)
|
protected String[] | getEnabledProtocols(SSLServerSocket socket, String requestedProtocols)
|
protected KeyStore | getKeystore(String type, String pass)
|
protected String | getKeystorePassword()
|
protected KeyStore | getTrustStore(String keystoreType)
|
void | handshake(Socket sock) - Extra function to initiate the handshake.
|
protected void | setEnabledProtocols(SSLServerSocket socket, String[] protocols) - Set the SSL protocol variants to be enabled.
|
clientAuth
protected String clientAuth
enabledCiphers
protected String[] enabledCiphers
initialized
protected boolean initialized
sslProxy
protected SSLServerSocketFactory sslProxy
JSSESocketFactory
public JSSESocketFactory()
Constructor is used only by subclasses.
acceptSocket
public Socket acceptSocket(ServerSocket socket)
throws IOException
Wrapper function for accept(). This allows us to trap and
translate exceptions if necessary
- acceptSocket in interface ServerSocketFactory
configureClientAuth
protected void configureClientAuth(SSLServerSocket socket)
Configure Client authentication for this version of JSSE. The
JSSE included in Java 1.4 supports the 'want' value. Prior
versions of JSSE will treat 'want' as 'false'.
socket
- the SSLServerSocket
configureClientAuth
protected void configureClientAuth(SSLSocket socket)
Configure Client authentication for this version of JSSE. The
JSSE included in Java 1.4 supports the 'want' value. Prior
versions of JSSE will treat 'want' as 'false'.
createSocket
public ServerSocket createSocket(int port)
throws IOException
Returns a server socket which uses all network interfaces on
the host, and is bound to a the specified port. The socket is
configured with the socket options (such as accept timeout)
given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen to
createSocket
public ServerSocket createSocket(int port,
int backlog)
throws IOException
Returns a server socket which uses all network interfaces on
the host, is bound to a the specified port, and uses the
specified connection backlog. The socket is configured with
the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queued
createSocket
public ServerSocket createSocket(int port,
int backlog,
InetAddress ifAddress)
throws IOException
Returns a server socket which uses only the specified network
interface on the local host, is bound to a the specified port,
and uses the specified connection backlog. The socket is configured
with the socket options (such as accept timeout) given to this factory.
- createSocket in interface ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to use
getEnabledCiphers
protected String[] getEnabledCiphers(String requestedCiphers,
String[] supportedCiphers)
getEnabledProtocols
protected String[] getEnabledProtocols(SSLServerSocket socket,
String requestedProtocols)
getKeystore
protected KeyStore getKeystore(String type,
String pass)
throws IOException
getKeystorePassword
protected String getKeystorePassword()
getTrustStore
protected KeyStore getTrustStore(String keystoreType)
throws IOException
handshake
public void handshake(Socket sock)
throws IOException
Extra function to initiate the handshake. Sometimes necessary
for SSL
- handshake in interface ServerSocketFactory
setEnabledProtocols
protected void setEnabledProtocols(SSLServerSocket socket,
String[] protocols)
Set the SSL protocol variants to be enabled.
socket
- the SSLServerSocket.protocols
- the protocols to use.
Copyright B) 2000-2003 Apache Software Foundation. All Rights Reserved.