Class OpenSSLEngine
- java.lang.Object
-
- javax.net.ssl.SSLEngine
-
- org.apache.tomcat.util.net.openssl.OpenSSLEngine
-
- All Implemented Interfaces:
SSLUtil.ProtocolInfo
public final class OpenSSLEngine extends SSLEngine implements SSLUtil.ProtocolInfo
Implements aSSLEngine
using OpenSSL BIO abstractions.
-
-
Field Summary
Fields Modifier and Type Field Description static Set<String>
AVAILABLE_CIPHER_SUITES
static Set<String>
IMPLEMENTED_PROTOCOLS_SET
-
Method Summary
-
Methods inherited from class javax.net.ssl.SSLEngine
getApplicationProtocol, getHandshakeApplicationProtocol, getHandshakeApplicationProtocolSelector, getHandshakeSession, getPeerHost, getPeerPort, getSSLParameters, setHandshakeApplicationProtocolSelector, setSSLParameters, unwrap, unwrap, wrap, wrap
-
-
-
-
Method Detail
-
getNegotiatedProtocol
public String getNegotiatedProtocol()
Description copied from interface:SSLUtil.ProtocolInfo
ALPN information.- Specified by:
getNegotiatedProtocol
in interfaceSSLUtil.ProtocolInfo
- Returns:
- the protocol selected using ALPN
-
shutdown
public void shutdown()
Destroys this engine.
-
wrap
public SSLEngineResult wrap(ByteBuffer[] srcs, int offset, int length, ByteBuffer dst) throws SSLException
- Specified by:
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
-
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 b)
- Specified by:
setNeedClientAuth
in classSSLEngine
-
getNeedClientAuth
public boolean getNeedClientAuth()
- Specified by:
getNeedClientAuth
in classSSLEngine
-
setWantClientAuth
public void setWantClientAuth(boolean b)
- Specified by:
setWantClientAuth
in classSSLEngine
-
getWantClientAuth
public boolean getWantClientAuth()
- Specified by:
getWantClientAuth
in classSSLEngine
-
setEnableSessionCreation
public void setEnableSessionCreation(boolean b)
- Specified by:
setEnableSessionCreation
in classSSLEngine
-
getEnableSessionCreation
public boolean getEnableSessionCreation()
- Specified by:
getEnableSessionCreation
in classSSLEngine
-
-