Package io.netty.handler.ssl
Class JdkSslEngine
java.lang.Object
javax.net.ssl.SSLEngine
io.netty.handler.ssl.JdkSslEngine
- All Implemented Interfaces:
ApplicationProtocolAccessor
- Direct Known Subclasses:
JdkAlpnSslEngine
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
void
void
String[]
String[]
boolean
boolean
Returns the name of the negotiated application-level protocol.int
String[]
String[]
boolean
boolean
boolean
boolean
void
setEnabledCipherSuites
(String[] strings) void
setEnabledProtocols
(String[] strings) void
setEnableSessionCreation
(boolean b) void
setNeedClientAuth
(boolean b) (package private) void
setNegotiatedApplicationProtocol
(String applicationProtocol) void
setSSLParameters
(SSLParameters sslParameters) void
setUseClientMode
(boolean b) void
setWantClientAuth
(boolean b) unwrap
(ByteBuffer byteBuffer, ByteBuffer byteBuffer2) unwrap
(ByteBuffer byteBuffer, ByteBuffer[] byteBuffers) unwrap
(ByteBuffer byteBuffer, ByteBuffer[] byteBuffers, int i, int i2) wrap
(ByteBuffer[] byteBuffers, int i, int i2, ByteBuffer byteBuffer) wrap
(ByteBuffer[] byteBuffers, ByteBuffer byteBuffer) wrap
(ByteBuffer byteBuffer, ByteBuffer byteBuffer2) Methods inherited from class javax.net.ssl.SSLEngine
getApplicationProtocol, getHandshakeApplicationProtocol, getHandshakeApplicationProtocolSelector, setHandshakeApplicationProtocolSelector
-
Field Details
-
engine
-
applicationProtocol
-
-
Constructor Details
-
JdkSslEngine
JdkSslEngine(SSLEngine engine)
-
-
Method Details
-
getNegotiatedApplicationProtocol
Description copied from interface:ApplicationProtocolAccessor
Returns the name of the negotiated application-level protocol.- Specified by:
getNegotiatedApplicationProtocol
in interfaceApplicationProtocolAccessor
- Returns:
- the application-level protocol name or
null
if the negotiation failed or the client does not have ALPN/NPN extension
-
setNegotiatedApplicationProtocol
-
getSession
- Specified by:
getSession
in classSSLEngine
-
getWrappedEngine
-
closeInbound
- Specified by:
closeInbound
in classSSLEngine
- Throws:
SSLException
-
closeOutbound
public void closeOutbound()- Specified by:
closeOutbound
in classSSLEngine
-
getPeerHost
- Overrides:
getPeerHost
in classSSLEngine
-
getPeerPort
public int getPeerPort()- Overrides:
getPeerPort
in classSSLEngine
-
wrap
- Overrides:
wrap
in classSSLEngine
- Throws:
SSLException
-
wrap
- Overrides:
wrap
in classSSLEngine
- Throws:
SSLException
-
wrap
public SSLEngineResult wrap(ByteBuffer[] byteBuffers, int i, int i2, ByteBuffer byteBuffer) throws SSLException - Specified by:
wrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
- Overrides:
unwrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
- Overrides:
unwrap
in classSSLEngine
- Throws:
SSLException
-
unwrap
public SSLEngineResult unwrap(ByteBuffer byteBuffer, ByteBuffer[] byteBuffers, int i, int i2) throws SSLException - Specified by:
unwrap
in classSSLEngine
- Throws:
SSLException
-
getDelegatedTask
- Specified by:
getDelegatedTask
in classSSLEngine
-
isInboundDone
public boolean isInboundDone()- Specified by:
isInboundDone
in classSSLEngine
-
isOutboundDone
public boolean isOutboundDone()- Specified by:
isOutboundDone
in classSSLEngine
-
getSupportedCipherSuites
- Specified by:
getSupportedCipherSuites
in classSSLEngine
-
getEnabledCipherSuites
- Specified by:
getEnabledCipherSuites
in classSSLEngine
-
setEnabledCipherSuites
- Specified by:
setEnabledCipherSuites
in classSSLEngine
-
getSupportedProtocols
- Specified by:
getSupportedProtocols
in classSSLEngine
-
getEnabledProtocols
- Specified by:
getEnabledProtocols
in classSSLEngine
-
setEnabledProtocols
- Specified by:
setEnabledProtocols
in classSSLEngine
-
getHandshakeSession
- Overrides:
getHandshakeSession
in classSSLEngine
-
beginHandshake
- Specified by:
beginHandshake
in classSSLEngine
- Throws:
SSLException
-
getHandshakeStatus
- Specified by:
getHandshakeStatus
in classSSLEngine
-
setUseClientMode
public void setUseClientMode(boolean b) - 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
-
getSSLParameters
- Overrides:
getSSLParameters
in classSSLEngine
-
setSSLParameters
- Overrides:
setSSLParameters
in classSSLEngine
-