Package org.wildfly.security.ssl
Class SelectingServerSSLEngine
- java.lang.Object
-
- javax.net.ssl.SSLEngine
-
- org.wildfly.security.ssl.SelectingServerSSLEngine
-
class SelectingServerSSLEngine extends SSLEngine
- Author:
- David M. Lloyd
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
SelectingServerSSLEngine.InitialState
-
Field Summary
Fields Modifier and Type Field Description (package private) static SSLEngine
CLOSED_STATE
private AtomicReference<SSLEngine>
currentRef
(package private) static int
FL_NEED_C_AUTH
(package private) static int
FL_SESSION_CRE
(package private) static int
FL_WANT_C_AUTH
private static SSLEngineResult
OK_UNWRAP
private static SSLEngineResult
UNDERFLOW_UNWRAP
-
Constructor Summary
Constructors Constructor Description SelectingServerSSLEngine(SSLContextSelector selector)
SelectingServerSSLEngine(SSLContextSelector selector, String host, int port)
-
Method Summary
-
-
-
Field Detail
-
UNDERFLOW_UNWRAP
private static final SSLEngineResult UNDERFLOW_UNWRAP
-
OK_UNWRAP
private static final SSLEngineResult OK_UNWRAP
-
currentRef
private final AtomicReference<SSLEngine> currentRef
-
FL_WANT_C_AUTH
static final int FL_WANT_C_AUTH
- See Also:
- Constant Field Values
-
FL_NEED_C_AUTH
static final int FL_NEED_C_AUTH
- See Also:
- Constant Field Values
-
FL_SESSION_CRE
static final int FL_SESSION_CRE
- See Also:
- Constant Field Values
-
CLOSED_STATE
static final SSLEngine CLOSED_STATE
-
-
Constructor Detail
-
SelectingServerSSLEngine
SelectingServerSSLEngine(SSLContextSelector selector)
-
SelectingServerSSLEngine
SelectingServerSSLEngine(SSLContextSelector selector, String host, int port)
-
-
Method Detail
-
wrap
public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int length, ByteBuffer dst) throws SSLException
- Specified by:
wrap
in classSSLEngine
- Throws:
SSLException
-
wrap
public SSLEngineResult wrap(ByteBuffer src, ByteBuffer dst) throws SSLException
- Overrides:
wrap
in classSSLEngine
- Throws:
SSLException
-
wrap
public SSLEngineResult wrap(ByteBuffer[] srcs, ByteBuffer dst) throws SSLException
- Overrides:
wrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts, int offset, int length) throws SSLException
- Specified by:
unwrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer dst) throws SSLException
- Overrides:
unwrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
public SSLEngineResult unwrap(ByteBuffer src, ByteBuffer[] dsts) throws SSLException
- Overrides:
unwrap
in classSSLEngine
- Throws:
SSLException
-
getPeerHost
public String getPeerHost()
- Overrides:
getPeerHost
in classSSLEngine
-
getPeerPort
public int getPeerPort()
- Overrides:
getPeerPort
in classSSLEngine
-
getHandshakeSession
public SSLSession getHandshakeSession()
- Overrides:
getHandshakeSession
in classSSLEngine
-
getSSLParameters
public SSLParameters getSSLParameters()
- Overrides:
getSSLParameters
in classSSLEngine
-
setSSLParameters
public void setSSLParameters(SSLParameters params)
- Overrides:
setSSLParameters
in classSSLEngine
-
getDelegatedTask
public Runnable getDelegatedTask()
- Specified by:
getDelegatedTask
in classSSLEngine
-
closeInbound
public void closeInbound() throws SSLException
- Specified by:
closeInbound
in classSSLEngine
- Throws:
SSLException
-
isInboundDone
public boolean isInboundDone()
- Specified by:
isInboundDone
in classSSLEngine
-
closeOutbound
public void closeOutbound()
- Specified by:
closeOutbound
in classSSLEngine
-
isOutboundDone
public boolean isOutboundDone()
- Specified by:
isOutboundDone
in classSSLEngine
-
getSupportedCipherSuites
public String[] getSupportedCipherSuites()
- Specified by:
getSupportedCipherSuites
in classSSLEngine
-
getEnabledCipherSuites
public String[] getEnabledCipherSuites()
- Specified by:
getEnabledCipherSuites
in classSSLEngine
-
setEnabledCipherSuites
public void setEnabledCipherSuites(String[] cipherSuites)
- Specified by:
setEnabledCipherSuites
in classSSLEngine
-
getSupportedProtocols
public String[] getSupportedProtocols()
- Specified by:
getSupportedProtocols
in classSSLEngine
-
getEnabledProtocols
public String[] getEnabledProtocols()
- Specified by:
getEnabledProtocols
in classSSLEngine
-
setEnabledProtocols
public void setEnabledProtocols(String[] protocols)
- Specified by:
setEnabledProtocols
in classSSLEngine
-
getSession
public SSLSession getSession()
- Specified by:
getSession
in classSSLEngine
-
beginHandshake
public void beginHandshake() throws SSLException
- Specified by:
beginHandshake
in classSSLEngine
- Throws:
SSLException
-
getHandshakeStatus
public SSLEngineResult.HandshakeStatus getHandshakeStatus()
- Specified by:
getHandshakeStatus
in classSSLEngine
-
setUseClientMode
public void setUseClientMode(boolean clientMode)
- Specified by:
setUseClientMode
in classSSLEngine
-
getUseClientMode
public boolean getUseClientMode()
- Specified by:
getUseClientMode
in classSSLEngine
-
setNeedClientAuth
public void setNeedClientAuth(boolean clientAuth)
- Specified by:
setNeedClientAuth
in classSSLEngine
-
getNeedClientAuth
public boolean getNeedClientAuth()
- Specified by:
getNeedClientAuth
in classSSLEngine
-
setWantClientAuth
public void setWantClientAuth(boolean want)
- Specified by:
setWantClientAuth
in classSSLEngine
-
getWantClientAuth
public boolean getWantClientAuth()
- Specified by:
getWantClientAuth
in classSSLEngine
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean flag)
- Specified by:
setEnableSessionCreation
in classSSLEngine
-
getEnableSessionCreation
public boolean getEnableSessionCreation()
- Specified by:
getEnableSessionCreation
in classSSLEngine
-
getApplicationProtocol
public String getApplicationProtocol()
- Overrides:
getApplicationProtocol
in classSSLEngine
-
getHandshakeApplicationProtocol
public String getHandshakeApplicationProtocol()
- Overrides:
getHandshakeApplicationProtocol
in classSSLEngine
-
setHandshakeApplicationProtocolSelector
public void setHandshakeApplicationProtocolSelector(BiFunction<SSLEngine,List<String>,String> selector)
- Overrides:
setHandshakeApplicationProtocolSelector
in classSSLEngine
-
getHandshakeApplicationProtocolSelector
public BiFunction<SSLEngine,List<String>,String> getHandshakeApplicationProtocolSelector()
- Overrides:
getHandshakeApplicationProtocolSelector
in classSSLEngine
-
-