public class JSSESocketFactory extends ServerSocketFactory
Modifier and Type | Field and Description |
---|---|
protected boolean |
allowUnsafeLegacyRenegotiation |
protected String |
clientAuth |
protected String[] |
enabledCiphers |
protected boolean |
initialized |
protected boolean |
requireClientAuth
Flag to state that we require client authentication.
|
protected SSLServerSocketFactory |
sslProxy |
protected boolean |
wantClientAuth
Flag to state that we would like client authentication.
|
attributes
Constructor and Description |
---|
JSSESocketFactory() |
Modifier and Type | Method and Description |
---|---|
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 Collection<? extends CRL> |
getCRLs(String crlf)
Load the collection of CRLs.
|
protected String[] |
getEnabledCiphers(String requestedCiphers,
String[] supportedCiphers) |
protected String[] |
getEnabledProtocols(SSLServerSocket socket,
String requestedProtocols)
Determines the SSL protocol variants to be enabled.
|
protected KeyManager[] |
getKeyManagers(String keystoreType,
String keystoreProvider,
String algorithm,
String keyAlias)
Gets the initialized key managers.
|
protected KeyStore |
getKeystore(String type,
String provider,
String pass) |
protected String |
getKeystorePassword() |
protected CertPathParameters |
getParameters(String algorithm,
String crlf,
KeyStore trustStore)
Return the initialization parameters for the TrustManager.
|
protected TrustManager[] |
getTrustManagers(String keystoreType,
String keystoreProvider,
String algorithm)
Gets the intialized trust managers.
|
protected KeyStore |
getTrustStore(String keystoreType,
String keystoreProvider) |
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.
|
getDefault, initSocket, setAttribute
protected boolean initialized
protected String clientAuth
protected SSLServerSocketFactory sslProxy
protected String[] enabledCiphers
protected boolean allowUnsafeLegacyRenegotiation
protected boolean requireClientAuth
protected boolean wantClientAuth
public ServerSocket createSocket(int port) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen toIOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedIOException
- for networking errorspublic ServerSocket createSocket(int port, int backlog, InetAddress ifAddress) throws IOException
ServerSocketFactory
createSocket
in class ServerSocketFactory
port
- the port to listen tobacklog
- how many connections are queuedifAddress
- the network interface address to useIOException
- for networking errorspublic Socket acceptSocket(ServerSocket socket) throws IOException
ServerSocketFactory
acceptSocket
in class ServerSocketFactory
IOException
public void handshake(Socket sock) throws IOException
ServerSocketFactory
handshake
in class ServerSocketFactory
IOException
protected String[] getEnabledCiphers(String requestedCiphers, String[] supportedCiphers)
protected String getKeystorePassword()
protected KeyStore getKeystore(String type, String provider, String pass) throws IOException
IOException
protected KeyStore getTrustStore(String keystoreType, String keystoreProvider) throws IOException
IOException
protected KeyManager[] getKeyManagers(String keystoreType, String keystoreProvider, String algorithm, String keyAlias) throws Exception
Exception
protected TrustManager[] getTrustManagers(String keystoreType, String keystoreProvider, String algorithm) throws Exception
Exception
protected CertPathParameters getParameters(String algorithm, String crlf, KeyStore trustStore) throws Exception
PKIX
is supported.algorithm
- The algorithm to get parameters for.crlf
- The path to the CRL file.trustStore
- The configured TrustStore.Exception
protected Collection<? extends CRL> getCRLs(String crlf) throws IOException, CRLException, CertificateException
protected void setEnabledProtocols(SSLServerSocket socket, String[] protocols)
socket
- the SSLServerSocket.protocols
- the protocols to use.protected String[] getEnabledProtocols(SSLServerSocket socket, String requestedProtocols)
socket
- The socket to get supported list from.requestedProtocols
- Comma-separated list of requested SSL
protocol variantsprotected void configureClientAuth(SSLServerSocket socket)
socket
- the SSLServerSocketprotected void configureClientAuth(SSLSocket socket)
socket
- the SSLSocketCopyright © 2013 JBoss by Red Hat. All rights reserved.