Package org.conscrypt
Class SSLNullSession
- java.lang.Object
-
- org.conscrypt.SSLNullSession
-
- All Implemented Interfaces:
java.lang.Cloneable
,javax.net.ssl.SSLSession
,ConscryptSession
final class SSLNullSession extends java.lang.Object implements ConscryptSession, java.lang.Cloneable
This is returned in the place of aSSLSession
when no TLS connection could be negotiated, but one was requested from a method that can't throw an exception such asSSLSocket.getSession()
beforeSSLSocket.startHandshake()
is called.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description private static class
SSLNullSession.DefaultHolder
-
Field Summary
Fields Modifier and Type Field Description private long
creationTime
(package private) static java.lang.String
INVALID_CIPHER
private long
lastAccessedTime
-
Constructor Summary
Constructors Modifier Constructor Description private
SSLNullSession()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getApplicationBufferSize()
java.lang.String
getApplicationProtocol()
java.lang.String
getCipherSuite()
long
getCreationTime()
byte[]
getId()
long
getLastAccessedTime()
java.security.cert.Certificate[]
getLocalCertificates()
java.security.Principal
getLocalPrincipal()
(package private) static ConscryptSession
getNullSession()
int
getPacketBufferSize()
javax.security.cert.X509Certificate[]
getPeerCertificateChain()
java.security.cert.X509Certificate[]
getPeerCertificates()
java.lang.String
getPeerHost()
int
getPeerPort()
java.security.Principal
getPeerPrincipal()
byte[]
getPeerSignedCertificateTimestamp()
Returns the signed certificate timestamp (SCT) received from the peer.java.lang.String
getProtocol()
java.lang.String
getRequestedServerName()
javax.net.ssl.SSLSessionContext
getSessionContext()
java.util.List<byte[]>
getStatusResponses()
Returns the OCSP stapled response.java.lang.Object
getValue(java.lang.String name)
java.lang.String[]
getValueNames()
void
invalidate()
boolean
isValid()
void
putValue(java.lang.String name, java.lang.Object value)
void
removeValue(java.lang.String name)
-
-
-
Field Detail
-
INVALID_CIPHER
static final java.lang.String INVALID_CIPHER
- See Also:
- Constant Field Values
-
creationTime
private long creationTime
-
lastAccessedTime
private long lastAccessedTime
-
-
Method Detail
-
getNullSession
static ConscryptSession getNullSession()
-
getRequestedServerName
public java.lang.String getRequestedServerName()
- Specified by:
getRequestedServerName
in interfaceConscryptSession
-
getStatusResponses
public java.util.List<byte[]> getStatusResponses()
Description copied from interface:ConscryptSession
Returns the OCSP stapled response. Returns a copy of the internal arrays. The method signature matches Java 9.- Specified by:
getStatusResponses
in interfaceConscryptSession
- See Also:
- RFC 6066, RFC 6961
-
getPeerSignedCertificateTimestamp
public byte[] getPeerSignedCertificateTimestamp()
Description copied from interface:ConscryptSession
Returns the signed certificate timestamp (SCT) received from the peer. Returns a copy of the internal array.- Specified by:
getPeerSignedCertificateTimestamp
in interfaceConscryptSession
- See Also:
- RFC 6962
-
getApplicationBufferSize
public int getApplicationBufferSize()
- Specified by:
getApplicationBufferSize
in interfacejavax.net.ssl.SSLSession
-
getApplicationProtocol
public java.lang.String getApplicationProtocol()
- Specified by:
getApplicationProtocol
in interfaceConscryptSession
-
getCipherSuite
public java.lang.String getCipherSuite()
- Specified by:
getCipherSuite
in interfacejavax.net.ssl.SSLSession
-
getCreationTime
public long getCreationTime()
- Specified by:
getCreationTime
in interfacejavax.net.ssl.SSLSession
-
getId
public byte[] getId()
- Specified by:
getId
in interfacejavax.net.ssl.SSLSession
-
getLastAccessedTime
public long getLastAccessedTime()
- Specified by:
getLastAccessedTime
in interfacejavax.net.ssl.SSLSession
-
getLocalCertificates
public java.security.cert.Certificate[] getLocalCertificates()
- Specified by:
getLocalCertificates
in interfacejavax.net.ssl.SSLSession
-
getLocalPrincipal
public java.security.Principal getLocalPrincipal()
- Specified by:
getLocalPrincipal
in interfacejavax.net.ssl.SSLSession
-
getPacketBufferSize
public int getPacketBufferSize()
- Specified by:
getPacketBufferSize
in interfacejavax.net.ssl.SSLSession
-
getPeerCertificateChain
public javax.security.cert.X509Certificate[] getPeerCertificateChain() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerCertificateChain
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getPeerCertificates
public java.security.cert.X509Certificate[] getPeerCertificates() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerCertificates
in interfaceConscryptSession
- Specified by:
getPeerCertificates
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getPeerHost
public java.lang.String getPeerHost()
- Specified by:
getPeerHost
in interfacejavax.net.ssl.SSLSession
-
getPeerPort
public int getPeerPort()
- Specified by:
getPeerPort
in interfacejavax.net.ssl.SSLSession
-
getPeerPrincipal
public java.security.Principal getPeerPrincipal() throws javax.net.ssl.SSLPeerUnverifiedException
- Specified by:
getPeerPrincipal
in interfacejavax.net.ssl.SSLSession
- Throws:
javax.net.ssl.SSLPeerUnverifiedException
-
getProtocol
public java.lang.String getProtocol()
- Specified by:
getProtocol
in interfacejavax.net.ssl.SSLSession
-
getSessionContext
public javax.net.ssl.SSLSessionContext getSessionContext()
- Specified by:
getSessionContext
in interfacejavax.net.ssl.SSLSession
-
getValue
public java.lang.Object getValue(java.lang.String name)
- Specified by:
getValue
in interfacejavax.net.ssl.SSLSession
-
getValueNames
public java.lang.String[] getValueNames()
- Specified by:
getValueNames
in interfacejavax.net.ssl.SSLSession
-
invalidate
public void invalidate()
- Specified by:
invalidate
in interfacejavax.net.ssl.SSLSession
-
isValid
public boolean isValid()
- Specified by:
isValid
in interfacejavax.net.ssl.SSLSession
-
putValue
public void putValue(java.lang.String name, java.lang.Object value)
- Specified by:
putValue
in interfacejavax.net.ssl.SSLSession
-
removeValue
public void removeValue(java.lang.String name)
- Specified by:
removeValue
in interfacejavax.net.ssl.SSLSession
-
-