Package io.netty.handler.ssl
Interface OpenSslInternalSession
-
- All Superinterfaces:
OpenSslSession,javax.net.ssl.SSLSession
- All Known Implementing Classes:
ExtendedOpenSslSession,OpenSslSessionCache.NativeSslSession,ReferenceCountedOpenSslEngine.DefaultOpenSslSession
interface OpenSslInternalSession extends OpenSslSession
SSLSessionthat is specific to our native implementation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidhandshakeFinished(byte[] id, java.lang.String cipher, java.lang.String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout)Called once the handshake has completed.java.util.Map<java.lang.String,java.lang.Object>keyValueStorage()Return the underlyingMapthat is used by the following methods:SSLSession.putValue(String, Object)SSLSession.removeValue(String)SSLSession.getValue(String)SSLSession.getValueNames()TheMapmust be thread-safe!voidprepareHandshake()Called on a handshake session before being exposed to aTrustManager.OpenSslSessionIdsessionId()Return theOpenSslSessionIdthat can be used to identify this session.voidsetLastAccessedTime(long time)Set the last access time which will be returned bySSLSession.getLastAccessedTime().voidsetLocalCertificate(java.security.cert.Certificate[] localCertificate)Set the local certificate chain that is used.voidsetSessionDetails(long creationTime, long lastAccessedTime, OpenSslSessionId id, java.util.Map<java.lang.String,java.lang.Object> keyValueStorage)Set the details for the session which might come from a cache.voidtryExpandApplicationBufferSize(int packetLengthDataOnly)Expand (or increase) the value returned bySSLSession.getApplicationBufferSize()if necessary.-
Methods inherited from interface io.netty.handler.ssl.OpenSslSession
getSessionContext, hasPeerCertificates
-
Methods inherited from interface javax.net.ssl.SSLSession
getApplicationBufferSize, getCipherSuite, getCreationTime, getId, getLastAccessedTime, getLocalCertificates, getLocalPrincipal, getPacketBufferSize, getPeerCertificateChain, getPeerCertificates, getPeerHost, getPeerPort, getPeerPrincipal, getProtocol, getValue, getValueNames, invalidate, isValid, putValue, removeValue
-
-
-
-
Method Detail
-
prepareHandshake
void prepareHandshake()
Called on a handshake session before being exposed to aTrustManager. Session data must be cleared by this call.
-
sessionId
OpenSslSessionId sessionId()
Return theOpenSslSessionIdthat can be used to identify this session.
-
setLocalCertificate
void setLocalCertificate(java.security.cert.Certificate[] localCertificate)
Set the local certificate chain that is used. It is not expected that this array will be changed at all and so its ok to not copy the array.
-
setSessionDetails
void setSessionDetails(long creationTime, long lastAccessedTime, OpenSslSessionId id, java.util.Map<java.lang.String,java.lang.Object> keyValueStorage)Set the details for the session which might come from a cache.- Parameters:
creationTime- the time at which the session was created.lastAccessedTime- the time at which the session was last accessed via the session infrastructure (cache).id- theOpenSslSessionIdkeyValueStorage- the key value store. SeekeyValueStorage().
-
keyValueStorage
java.util.Map<java.lang.String,java.lang.Object> keyValueStorage()
Return the underlyingMapthat is used by the following methods:SSLSession.putValue(String, Object)SSLSession.removeValue(String)SSLSession.getValue(String)-
SSLSession.getValueNames()
Mapmust be thread-safe!- Returns:
- storage
-
setLastAccessedTime
void setLastAccessedTime(long time)
Set the last access time which will be returned bySSLSession.getLastAccessedTime().- Parameters:
time- the time
-
tryExpandApplicationBufferSize
void tryExpandApplicationBufferSize(int packetLengthDataOnly)
Expand (or increase) the value returned bySSLSession.getApplicationBufferSize()if necessary.This is only called in a synchronized block, so no need to use atomic operations.
- Parameters:
packetLengthDataOnly- The packet size which exceeds the currentSSLSession.getApplicationBufferSize().
-
handshakeFinished
void handshakeFinished(byte[] id, java.lang.String cipher, java.lang.String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws javax.net.ssl.SSLExceptionCalled once the handshake has completed.- Throws:
javax.net.ssl.SSLException
-
-