Package org.wildfly.security.ssl
Class SSLConfiguratorImpl
- java.lang.Object
-
- org.wildfly.security.ssl.SSLConfiguratorImpl
-
- All Implemented Interfaces:
SSLConfigurator
final class SSLConfiguratorImpl extends Object implements SSLConfigurator
-
-
Field Summary
Fields Modifier and Type Field Description private CipherSuiteSelector
cipherSuiteSelector
private boolean
clientMode
private boolean
needClientAuth
private ProtocolSelector
protocolSelector
private boolean
useCipherSuitesOrder
private boolean
wantClientAuth
-
Constructor Summary
Constructors Constructor Description SSLConfiguratorImpl(ProtocolSelector protocolSelector, CipherSuiteSelector cipherSuiteSelector, boolean useCipherSuitesOrder)
Construct a new instance in client mode.SSLConfiguratorImpl(ProtocolSelector protocolSelector, CipherSuiteSelector cipherSuiteSelector, boolean wantClientAuth, boolean needClientAuth, boolean useCipherSuitesOrder)
Construct a new instance in server mode.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
configure(SSLContext context, SSLEngine sslEngine)
void
configure(SSLContext context, SSLServerSocket sslServerSocket)
void
configure(SSLContext context, SSLSocket sslSocket)
(package private) void
configure(SSLParameters params, String[] supportedProtocols, String[] supportedCipherSuites)
SSLParameters
getDefaultSSLParameters(SSLContext sslContext, SSLParameters original)
SSLParameters
getSupportedSSLParameters(SSLContext sslContext, SSLParameters original)
private SSLParameters
redefine(SSLParameters original)
void
setEnabledCipherSuites(SSLContext sslContext, SSLEngine sslEngine, String[] cipherSuites)
void
setEnabledCipherSuites(SSLContext sslContext, SSLServerSocket sslServerSocket, String[] cipherSuites)
void
setEnabledCipherSuites(SSLContext sslContext, SSLSocket sslSocket, String[] cipherSuites)
void
setEnabledProtocols(SSLContext sslContext, SSLEngine sslEngine, String[] protocols)
void
setEnabledProtocols(SSLContext sslContext, SSLServerSocket sslServerSocket, String[] protocols)
void
setEnabledProtocols(SSLContext sslContext, SSLSocket sslSocket, String[] protocols)
void
setNeedClientAuth(SSLContext context, SSLEngine sslEngine, boolean value)
void
setNeedClientAuth(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean value)
void
setNeedClientAuth(SSLContext context, SSLSocket sslSocket, boolean value)
void
setSSLParameters(SSLContext sslContext, SSLEngine sslEngine, SSLParameters parameters)
void
setSSLParameters(SSLContext sslContext, SSLServerSocket sslServerSocket, SSLParameters parameters)
void
setSSLParameters(SSLContext sslContext, SSLSocket sslSocket, SSLParameters parameters)
void
setUseClientMode(SSLContext sslContext, SSLEngine sslEngine, boolean mode)
void
setUseClientMode(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean mode)
void
setUseClientMode(SSLContext sslContext, SSLSocket sslSocket, boolean mode)
void
setWantClientAuth(SSLContext context, SSLEngine sslEngine, boolean value)
void
setWantClientAuth(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean value)
void
setWantClientAuth(SSLContext context, SSLSocket sslSocket, boolean value)
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.wildfly.security.ssl.SSLConfigurator
configure, setEnableSessionCreation, setEnableSessionCreation, setEnableSessionCreation
-
-
-
-
Field Detail
-
protocolSelector
private final ProtocolSelector protocolSelector
-
cipherSuiteSelector
private final CipherSuiteSelector cipherSuiteSelector
-
wantClientAuth
private final boolean wantClientAuth
-
needClientAuth
private final boolean needClientAuth
-
useCipherSuitesOrder
private final boolean useCipherSuitesOrder
-
clientMode
private final boolean clientMode
-
-
Constructor Detail
-
SSLConfiguratorImpl
SSLConfiguratorImpl(ProtocolSelector protocolSelector, CipherSuiteSelector cipherSuiteSelector, boolean wantClientAuth, boolean needClientAuth, boolean useCipherSuitesOrder)
Construct a new instance in server mode.- Parameters:
protocolSelector
- the protocol selector (must not benull
)cipherSuiteSelector
- the cipher suite selector (must not benull
)wantClientAuth
-true
to request client authenticationneedClientAuth
-true
to require client authentication
-
SSLConfiguratorImpl
SSLConfiguratorImpl(ProtocolSelector protocolSelector, CipherSuiteSelector cipherSuiteSelector, boolean useCipherSuitesOrder)
Construct a new instance in client mode.- Parameters:
protocolSelector
- the protocol selector (must not benull
)cipherSuiteSelector
- the cipher suite selector (must not benull
)
-
-
Method Detail
-
configure
void configure(SSLParameters params, String[] supportedProtocols, String[] supportedCipherSuites)
-
configure
public void configure(SSLContext context, SSLServerSocket sslServerSocket)
- Specified by:
configure
in interfaceSSLConfigurator
-
configure
public void configure(SSLContext context, SSLSocket sslSocket)
- Specified by:
configure
in interfaceSSLConfigurator
-
configure
public void configure(SSLContext context, SSLEngine sslEngine)
- Specified by:
configure
in interfaceSSLConfigurator
-
getDefaultSSLParameters
public SSLParameters getDefaultSSLParameters(SSLContext sslContext, SSLParameters original)
- Specified by:
getDefaultSSLParameters
in interfaceSSLConfigurator
-
getSupportedSSLParameters
public SSLParameters getSupportedSSLParameters(SSLContext sslContext, SSLParameters original)
- Specified by:
getSupportedSSLParameters
in interfaceSSLConfigurator
-
setWantClientAuth
public void setWantClientAuth(SSLContext context, SSLSocket sslSocket, boolean value)
- Specified by:
setWantClientAuth
in interfaceSSLConfigurator
-
setWantClientAuth
public void setWantClientAuth(SSLContext context, SSLEngine sslEngine, boolean value)
- Specified by:
setWantClientAuth
in interfaceSSLConfigurator
-
setWantClientAuth
public void setWantClientAuth(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean value)
- Specified by:
setWantClientAuth
in interfaceSSLConfigurator
-
setNeedClientAuth
public void setNeedClientAuth(SSLContext context, SSLSocket sslSocket, boolean value)
- Specified by:
setNeedClientAuth
in interfaceSSLConfigurator
-
setNeedClientAuth
public void setNeedClientAuth(SSLContext context, SSLEngine sslEngine, boolean value)
- Specified by:
setNeedClientAuth
in interfaceSSLConfigurator
-
setNeedClientAuth
public void setNeedClientAuth(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean value)
- Specified by:
setNeedClientAuth
in interfaceSSLConfigurator
-
setEnabledCipherSuites
public void setEnabledCipherSuites(SSLContext sslContext, SSLSocket sslSocket, String[] cipherSuites)
- Specified by:
setEnabledCipherSuites
in interfaceSSLConfigurator
-
setEnabledCipherSuites
public void setEnabledCipherSuites(SSLContext sslContext, SSLEngine sslEngine, String[] cipherSuites)
- Specified by:
setEnabledCipherSuites
in interfaceSSLConfigurator
-
setEnabledCipherSuites
public void setEnabledCipherSuites(SSLContext sslContext, SSLServerSocket sslServerSocket, String[] cipherSuites)
- Specified by:
setEnabledCipherSuites
in interfaceSSLConfigurator
-
setEnabledProtocols
public void setEnabledProtocols(SSLContext sslContext, SSLSocket sslSocket, String[] protocols)
- Specified by:
setEnabledProtocols
in interfaceSSLConfigurator
-
setEnabledProtocols
public void setEnabledProtocols(SSLContext sslContext, SSLEngine sslEngine, String[] protocols)
- Specified by:
setEnabledProtocols
in interfaceSSLConfigurator
-
setEnabledProtocols
public void setEnabledProtocols(SSLContext sslContext, SSLServerSocket sslServerSocket, String[] protocols)
- Specified by:
setEnabledProtocols
in interfaceSSLConfigurator
-
redefine
private SSLParameters redefine(SSLParameters original)
-
setSSLParameters
public void setSSLParameters(SSLContext sslContext, SSLSocket sslSocket, SSLParameters parameters)
- Specified by:
setSSLParameters
in interfaceSSLConfigurator
-
setSSLParameters
public void setSSLParameters(SSLContext sslContext, SSLEngine sslEngine, SSLParameters parameters)
- Specified by:
setSSLParameters
in interfaceSSLConfigurator
-
setSSLParameters
public void setSSLParameters(SSLContext sslContext, SSLServerSocket sslServerSocket, SSLParameters parameters)
- Specified by:
setSSLParameters
in interfaceSSLConfigurator
-
setUseClientMode
public void setUseClientMode(SSLContext sslContext, SSLSocket sslSocket, boolean mode)
- Specified by:
setUseClientMode
in interfaceSSLConfigurator
-
setUseClientMode
public void setUseClientMode(SSLContext sslContext, SSLEngine sslEngine, boolean mode)
- Specified by:
setUseClientMode
in interfaceSSLConfigurator
-
setUseClientMode
public void setUseClientMode(SSLContext sslContext, SSLServerSocket sslServerSocket, boolean mode)
- Specified by:
setUseClientMode
in interfaceSSLConfigurator
-
-