Package io.netty.handler.ssl
Class ExtendedOpenSslSession
java.lang.Object
javax.net.ssl.ExtendedSSLSession
io.netty.handler.ssl.ExtendedOpenSslSession
- All Implemented Interfaces:
OpenSslSession
,SSLSession
Delegates all operations to a wrapped
OpenSslSession
except the methods defined by ExtendedSSLSession
itself.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate final class
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
final int
final String
final long
final byte[]
getId()
final long
final Certificate[]
final Principal
final String[]
final int
final X509Certificate[]
final Certificate[]
final String
final int
final Principal
String[]
abstract List
final OpenSslSessionContext
List
<byte[]> final Object
final String[]
void
handshakeFinished
(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) Called once the handshake has completed.int
hashCode()
final void
final boolean
isValid()
Return the underlyingMap
that is used by the following methods:SSLSession.putValue(String, Object)
SSLSession.removeValue(String)
SSLSession.getValue(String)
SSLSession.getValueNames()
TheMap
must be thread-safe!void
Called on a handshake session before being exposed to aTrustManager
.final void
final void
Return theOpenSslSessionId
that can be used to identify this session.void
setLastAccessedTime
(long time) Set the last access time which will be returned bySSLSession.getLastAccessedTime()
.final void
setLocalCertificate
(Certificate[] localCertificate) Set the local certificate chain that is used.void
setSessionDetails
(long creationTime, long lastAccessedTime, OpenSslSessionId id, Map<String, Object> keyValueStorage) Set the details for the session which might come from a cache.toString()
final void
tryExpandApplicationBufferSize
(int packetLengthDataOnly) Expand (or increase) the value returned bySSLSession.getApplicationBufferSize()
if necessary.
-
Field Details
-
LOCAL_SUPPORTED_SIGNATURE_ALGORITHMS
-
wrapped
-
-
Constructor Details
-
ExtendedOpenSslSession
ExtendedOpenSslSession(OpenSslSession wrapped)
-
-
Method Details
-
getRequestedServerNames
- Overrides:
getRequestedServerNames
in classExtendedSSLSession
-
getStatusResponses
- Overrides:
getStatusResponses
in classExtendedSSLSession
-
prepareHandshake
public void prepareHandshake()Description copied from interface:OpenSslSession
Called on a handshake session before being exposed to aTrustManager
. Session data must be cleared by this call.- Specified by:
prepareHandshake
in interfaceOpenSslSession
-
keyValueStorage
Description copied from interface:OpenSslSession
Return the underlyingMap
that is used by the following methods:SSLSession.putValue(String, Object)
SSLSession.removeValue(String)
SSLSession.getValue(String)
-
SSLSession.getValueNames()
Map
must be thread-safe!- Specified by:
keyValueStorage
in interfaceOpenSslSession
- Returns:
- storage
-
sessionId
Description copied from interface:OpenSslSession
Return theOpenSslSessionId
that can be used to identify this session.- Specified by:
sessionId
in interfaceOpenSslSession
-
setSessionDetails
public void setSessionDetails(long creationTime, long lastAccessedTime, OpenSslSessionId id, Map<String, Object> keyValueStorage) Description copied from interface:OpenSslSession
Set the details for the session which might come from a cache.- Specified by:
setSessionDetails
in interfaceOpenSslSession
- 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
- theOpenSslSessionId
keyValueStorage
- the key value store. SeeOpenSslSession.keyValueStorage()
.
-
setLocalCertificate
Description copied from interface:OpenSslSession
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.- Specified by:
setLocalCertificate
in interfaceOpenSslSession
-
getPeerSupportedSignatureAlgorithms
- Specified by:
getPeerSupportedSignatureAlgorithms
in classExtendedSSLSession
-
tryExpandApplicationBufferSize
public final void tryExpandApplicationBufferSize(int packetLengthDataOnly) Description copied from interface:OpenSslSession
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.
- Specified by:
tryExpandApplicationBufferSize
in interfaceOpenSslSession
- Parameters:
packetLengthDataOnly
- The packet size which exceeds the currentSSLSession.getApplicationBufferSize()
.
-
getLocalSupportedSignatureAlgorithms
- Specified by:
getLocalSupportedSignatureAlgorithms
in classExtendedSSLSession
-
getId
public final byte[] getId()- Specified by:
getId
in interfaceSSLSession
-
getSessionContext
- Specified by:
getSessionContext
in interfaceOpenSslSession
- Specified by:
getSessionContext
in interfaceSSLSession
-
getCreationTime
public final long getCreationTime()- Specified by:
getCreationTime
in interfaceSSLSession
-
getLastAccessedTime
public final long getLastAccessedTime()- Specified by:
getLastAccessedTime
in interfaceSSLSession
-
setLastAccessedTime
public void setLastAccessedTime(long time) Description copied from interface:OpenSslSession
Set the last access time which will be returned bySSLSession.getLastAccessedTime()
.- Specified by:
setLastAccessedTime
in interfaceOpenSslSession
- Parameters:
time
- the time
-
invalidate
public final void invalidate()- Specified by:
invalidate
in interfaceSSLSession
-
isValid
public final boolean isValid()- Specified by:
isValid
in interfaceSSLSession
-
putValue
- Specified by:
putValue
in interfaceSSLSession
-
getValue
- Specified by:
getValue
in interfaceSSLSession
-
removeValue
- Specified by:
removeValue
in interfaceSSLSession
-
getValueNames
- Specified by:
getValueNames
in interfaceSSLSession
-
getPeerCertificates
- Specified by:
getPeerCertificates
in interfaceSSLSession
- Throws:
SSLPeerUnverifiedException
-
getLocalCertificates
- Specified by:
getLocalCertificates
in interfaceSSLSession
-
getPeerCertificateChain
- Specified by:
getPeerCertificateChain
in interfaceSSLSession
- Throws:
SSLPeerUnverifiedException
-
getPeerPrincipal
- Specified by:
getPeerPrincipal
in interfaceSSLSession
- Throws:
SSLPeerUnverifiedException
-
getLocalPrincipal
- Specified by:
getLocalPrincipal
in interfaceSSLSession
-
getCipherSuite
- Specified by:
getCipherSuite
in interfaceSSLSession
-
getProtocol
- Specified by:
getProtocol
in interfaceSSLSession
-
getPeerHost
- Specified by:
getPeerHost
in interfaceSSLSession
-
getPeerPort
public final int getPeerPort()- Specified by:
getPeerPort
in interfaceSSLSession
-
getPacketBufferSize
public final int getPacketBufferSize()- Specified by:
getPacketBufferSize
in interfaceSSLSession
-
getApplicationBufferSize
public final int getApplicationBufferSize()- Specified by:
getApplicationBufferSize
in interfaceSSLSession
-
handshakeFinished
public void handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws SSLException Description copied from interface:OpenSslSession
Called once the handshake has completed.- Specified by:
handshakeFinished
in interfaceOpenSslSession
- Throws:
SSLException
-
equals
-
hashCode
public int hashCode() -
toString
-