Top Description Methods
io.netty5.handler.ssl

pack-priv Interface OpenSslSession

extends SSLSession
Known Direct Implementers
io.netty5.handler.ssl.OpenSslSessionCache.NativeSslSession, io.netty5.handler.ssl.ReferenceCountedOpenSslEngine.DefaultOpenSslSession
Imports
io.netty5.util.ReferenceCounted, javax.net.ssl.SSLException, .SSLSession, java.security.cert.Certificate

SSLSession that is specific to our native implementation and ReferenceCounted to track native resources.

Method Summary

Modifier and TypeMethod and Description
public OpenSslSessionContext
getSessionContext()

Redeclares javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.
public void
handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout)

Called once the handshake has completed.

public OpenSslSessionId
sessionId()

Return the OpenSslSessionId that can be used to identify this session.

public void
setLocalCertificate(Certificate[] localCertificate)

Set the local certificate chain that is used.

public void
public void
tryExpandApplicationBufferSize(int
The packet size which exceeds the current getApplicationBufferSize().
packetLengthDataOnly
)

Expand (or increase) the value returned by getApplicationBufferSize() if necessary.

Inherited from javax.net.ssl.SSLSession:
getApplicationBufferSizegetCipherSuitegetCreationTimegetIdgetLastAccessedTimegetLocalCertificatesgetLocalPrincipalgetPacketBufferSizegetPeerCertificateChaingetPeerCertificatesgetPeerHostgetPeerPortgetPeerPrincipalgetProtocolgetValuegetValueNamesinvalidateisValidputValueremoveValue

Method Detail

getSessionContextback to summary
public OpenSslSessionContext getSessionContext()

Redeclares javax.net.ssl.SSLSession.getSessionContext.

Doc from javax.net.ssl.SSLSession.getSessionContext.

Returns the context in which this session is bound.

This context may be unavailable in some environments, in which case this method returns null.

If the context is available and there is a security manager installed, the caller may require permission to access it or a security exception may be thrown. In a Java environment, the security manager's checkPermission method is called with a SSLPermission("getSSLSessionContext") permission.

Returns:OpenSslSessionContext

the session context used for this session, or null if the context is unavailable.

Annotations
@Override
handshakeFinishedback to summary
public void handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws SSLException

Called once the handshake has completed.

sessionIdback to summary
public OpenSslSessionId sessionId()

Return the OpenSslSessionId that can be used to identify this session.

setLocalCertificateback to summary
public void setLocalCertificate(Certificate[] localCertificate)

Set the local certificate chain that is used. It is unexpected this array will be changed at all, and so it's ok to not copy the array.

setSessionIdback to summary
public void setSessionId(OpenSslSessionId id)

Set the OpenSslSessionId for the OpenSslSession.

tryExpandApplicationBufferSizeback to summary
public void tryExpandApplicationBufferSize(int packetLengthDataOnly)

Expand (or increase) the value returned by getApplicationBufferSize() if necessary.

This is only called in a synchronized block, so no need to use atomic operations.

Parameters
packetLengthDataOnly:int

The packet size which exceeds the current getApplicationBufferSize().