Package org.conscrypt
Class NativeSslSession.Impl
- java.lang.Object
-
- org.conscrypt.NativeSslSession
-
- org.conscrypt.NativeSslSession.Impl
-
- Enclosing class:
- NativeSslSession
private static final class NativeSslSession.Impl extends NativeSslSession
The session wrapper implementation.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.String
cipherSuite
private AbstractSessionContext
context
private java.lang.String
host
private java.security.cert.X509Certificate[]
peerCertificates
private byte[]
peerOcspStapledResponse
private byte[]
peerSignedCertificateTimestamp
private int
port
private java.lang.String
protocol
private NativeRef.SSL_SESSION
ref
-
Constructor Summary
Constructors Modifier Constructor Description private
Impl(AbstractSessionContext context, NativeRef.SSL_SESSION ref, java.lang.String host, int port, java.security.cert.X509Certificate[] peerCertificates, byte[] peerOcspStapledResponse, byte[] peerSignedCertificateTimestamp)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) java.lang.String
getCipherSuite()
private long
getCreationTime()
(package private) byte[]
getId()
(package private) java.lang.String
getPeerHost()
(package private) byte[]
getPeerOcspStapledResponse()
Returns the OCSP stapled response.(package private) int
getPeerPort()
(package private) byte[]
getPeerSignedCertificateTimestamp()
Returns the signed certificate timestamp (SCT) received from the peer.(package private) java.lang.String
getProtocol()
(package private) boolean
isSingleUse()
Returns whether this session should only ever be used for resumption once.(package private) boolean
isValid()
(package private) void
offerToResume(NativeSsl ssl)
(package private) byte[]
toBytes()
Converts the given session to bytes.(package private) javax.net.ssl.SSLSession
toSSLSession()
Converts this object to aSSLSession
.-
Methods inherited from class org.conscrypt.NativeSslSession
newInstance, newInstance
-
-
-
-
Field Detail
-
ref
private final NativeRef.SSL_SESSION ref
-
context
private final AbstractSessionContext context
-
host
private final java.lang.String host
-
port
private final int port
-
protocol
private final java.lang.String protocol
-
cipherSuite
private final java.lang.String cipherSuite
-
peerCertificates
private final java.security.cert.X509Certificate[] peerCertificates
-
peerOcspStapledResponse
private final byte[] peerOcspStapledResponse
-
peerSignedCertificateTimestamp
private final byte[] peerSignedCertificateTimestamp
-
-
Constructor Detail
-
Impl
private Impl(AbstractSessionContext context, NativeRef.SSL_SESSION ref, java.lang.String host, int port, java.security.cert.X509Certificate[] peerCertificates, byte[] peerOcspStapledResponse, byte[] peerSignedCertificateTimestamp)
-
-
Method Detail
-
getId
byte[] getId()
- Specified by:
getId
in classNativeSslSession
-
getCreationTime
private long getCreationTime()
-
isValid
boolean isValid()
- Specified by:
isValid
in classNativeSslSession
-
isSingleUse
boolean isSingleUse()
Description copied from class:NativeSslSession
Returns whether this session should only ever be used for resumption once.- Specified by:
isSingleUse
in classNativeSslSession
-
offerToResume
void offerToResume(NativeSsl ssl) throws javax.net.ssl.SSLException
- Specified by:
offerToResume
in classNativeSslSession
- Throws:
javax.net.ssl.SSLException
-
getCipherSuite
java.lang.String getCipherSuite()
- Specified by:
getCipherSuite
in classNativeSslSession
-
getProtocol
java.lang.String getProtocol()
- Specified by:
getProtocol
in classNativeSslSession
-
getPeerHost
java.lang.String getPeerHost()
- Specified by:
getPeerHost
in classNativeSslSession
-
getPeerPort
int getPeerPort()
- Specified by:
getPeerPort
in classNativeSslSession
-
getPeerOcspStapledResponse
byte[] getPeerOcspStapledResponse()
Description copied from class:NativeSslSession
Returns the OCSP stapled response. The returned array is not copied; the caller must either not modify the returned array or make a copy.- Specified by:
getPeerOcspStapledResponse
in classNativeSslSession
- See Also:
- RFC 6066, RFC 6961
-
getPeerSignedCertificateTimestamp
byte[] getPeerSignedCertificateTimestamp()
Description copied from class:NativeSslSession
Returns the signed certificate timestamp (SCT) received from the peer. The returned array is not copied; the caller must either not modify the returned array or make a copy.- Specified by:
getPeerSignedCertificateTimestamp
in classNativeSslSession
- See Also:
- RFC 6962
-
toBytes
byte[] toBytes()
Description copied from class:NativeSslSession
Converts the given session to bytes.- Specified by:
toBytes
in classNativeSslSession
- Returns:
- session data as bytes or null if the session can't be converted
-
toSSLSession
javax.net.ssl.SSLSession toSSLSession()
Description copied from class:NativeSslSession
Converts this object to aSSLSession
. The returned session will support only a subset of theSSLSession
API.- Specified by:
toSSLSession
in classNativeSslSession
-
-