Package io.netty.handler.ssl
Class ExtendedOpenSslSession
- java.lang.Object
-
- javax.net.ssl.ExtendedSSLSession
-
- io.netty.handler.ssl.ExtendedOpenSslSession
-
- All Implemented Interfaces:
OpenSslSession
,javax.net.ssl.SSLSession
abstract class ExtendedOpenSslSession extends javax.net.ssl.ExtendedSSLSession implements OpenSslSession
Delegates all operations to a wrappedOpenSslSession
except the methods defined byExtendedSSLSession
itself.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private class
ExtendedOpenSslSession.SSLSessionBindingListenerDecorator
-
Field Summary
Fields Modifier and Type Field Description private static java.lang.String[]
LOCAL_SUPPORTED_SIGNATURE_ALGORITHMS
private OpenSslSession
wrapped
-
Constructor Summary
Constructors Constructor Description ExtendedOpenSslSession(OpenSslSession wrapped)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(java.lang.Object o)
int
getApplicationBufferSize()
java.lang.String
getCipherSuite()
long
getCreationTime()
byte[]
getId()
long
getLastAccessedTime()
java.security.cert.Certificate[]
getLocalCertificates()
java.security.Principal
getLocalPrincipal()
java.lang.String[]
getLocalSupportedSignatureAlgorithms()
int
getPacketBufferSize()
javax.security.cert.X509Certificate[]
getPeerCertificateChain()
java.security.cert.Certificate[]
getPeerCertificates()
java.lang.String
getPeerHost()
int
getPeerPort()
java.security.Principal
getPeerPrincipal()
java.lang.String[]
getPeerSupportedSignatureAlgorithms()
java.lang.String
getProtocol()
abstract java.util.List
getRequestedServerNames()
OpenSslSessionContext
getSessionContext()
java.util.List<byte[]>
getStatusResponses()
java.lang.Object
getValue(java.lang.String s)
java.lang.String[]
getValueNames()
void
handshakeFinished(byte[] id, java.lang.String cipher, java.lang.String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout)
Called once the handshake has completed.int
hashCode()
void
invalidate()
boolean
isValid()
java.util.Map<java.lang.String,java.lang.Object>
keyValueStorage()
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
prepareHandshake()
Called on a handshake session before being exposed to aTrustManager
.void
putValue(java.lang.String name, java.lang.Object value)
void
removeValue(java.lang.String s)
OpenSslSessionId
sessionId()
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()
.void
setLocalCertificate(java.security.cert.Certificate[] localCertificate)
Set the local certificate chain that is used.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.java.lang.String
toString()
void
tryExpandApplicationBufferSize(int packetLengthDataOnly)
Expand (or increase) the value returned bySSLSession.getApplicationBufferSize()
if necessary.
-
-
-
Field Detail
-
LOCAL_SUPPORTED_SIGNATURE_ALGORITHMS
private static final java.lang.String[] LOCAL_SUPPORTED_SIGNATURE_ALGORITHMS
-
wrapped
private final OpenSslSession wrapped
-
-
Constructor Detail
-
ExtendedOpenSslSession
ExtendedOpenSslSession(OpenSslSession wrapped)
-
-
Method Detail
-
getRequestedServerNames
public abstract java.util.List getRequestedServerNames()
- Overrides:
getRequestedServerNames
in classjavax.net.ssl.ExtendedSSLSession
-
getStatusResponses
public java.util.List<byte[]> getStatusResponses()
- Overrides:
getStatusResponses
in classjavax.net.ssl.ExtendedSSLSession
-
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
public java.util.Map<java.lang.String,java.lang.Object> 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
public OpenSslSessionId 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, java.util.Map<java.lang.String,java.lang.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
public final void setLocalCertificate(java.security.cert.Certificate[] localCertificate)
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
public java.lang.String[] getPeerSupportedSignatureAlgorithms()
- Specified by:
getPeerSupportedSignatureAlgorithms
in classjavax.net.ssl.ExtendedSSLSession
-
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
public final java.lang.String[] getLocalSupportedSignatureAlgorithms()
- Specified by:
getLocalSupportedSignatureAlgorithms
in classjavax.net.ssl.ExtendedSSLSession
-
getId
public final byte[] getId()
- Specified by:
getId
in interfacejavax.net.ssl.SSLSession
-
getSessionContext
public final OpenSslSessionContext getSessionContext()
- Specified by:
getSessionContext
in interfaceOpenSslSession
- Specified by:
getSessionContext
in interfacejavax.net.ssl.SSLSession
-
getCreationTime
public final long getCreationTime()
- Specified by:
getCreationTime
in interfacejavax.net.ssl.SSLSession
-
getLastAccessedTime
public final long getLastAccessedTime()
- Specified by:
getLastAccessedTime
in interfacejavax.net.ssl.SSLSession
-
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 interfacejavax.net.ssl.SSLSession
-
isValid
public final boolean isValid()
- Specified by:
isValid
in interfacejavax.net.ssl.SSLSession
-
putValue
public final void putValue(java.lang.String name, java.lang.Object value)
- Specified by:
putValue
in interfacejavax.net.ssl.SSLSession
-
getValue
public final java.lang.Object getValue(java.lang.String s)
- Specified by:
getValue
in interfacejavax.net.ssl.SSLSession
-
removeValue
public final void removeValue(java.lang.String s)
- Specified by:
removeValue
in interfacejavax.net.ssl.SSLSession
-
getValueNames
public final java.lang.String[] getValueNames()
- Specified by:
getValueNames
in interfacejavax.net.ssl.SSLSession
-
getPeerCertificates
public final java.security.cert.Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerCertificates
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getLocalCertificates
public final java.security.cert.Certificate[] getLocalCertificates()
- Specified by:
getLocalCertificates
in interfacejavax.net.ssl.SSLSession
-
getPeerCertificateChain
public final javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerCertificateChain
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getPeerPrincipal
public final java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerPrincipal
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getLocalPrincipal
public final java.security.Principal getLocalPrincipal()
- Specified by:
getLocalPrincipal
in interfacejavax.net.ssl.SSLSession
-
getCipherSuite
public final java.lang.String getCipherSuite()
- Specified by:
getCipherSuite
in interfacejavax.net.ssl.SSLSession
-
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interfacejavax.net.ssl.SSLSession
-
getPeerHost
public final java.lang.String getPeerHost()
- Specified by:
getPeerHost
in interfacejavax.net.ssl.SSLSession
-
getPeerPort
public final int getPeerPort()
- Specified by:
getPeerPort
in interfacejavax.net.ssl.SSLSession
-
getPacketBufferSize
public final int getPacketBufferSize()
- Specified by:
getPacketBufferSize
in interfacejavax.net.ssl.SSLSession
-
getApplicationBufferSize
public final int getApplicationBufferSize()
- Specified by:
getApplicationBufferSize
in interfacejavax.net.ssl.SSLSession
-
handshakeFinished
public void handshakeFinished(byte[] id, java.lang.String cipher, java.lang.String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws javax.net.ssl.SSLException
Description copied from interface:OpenSslSession
Called once the handshake has completed.- Specified by:
handshakeFinished
in interfaceOpenSslSession
- Throws:
javax.net.ssl.SSLException
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equals
in classjava.lang.Object
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classjava.lang.Object
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-