Package org.conscrypt
Class NativeSslSession.Impl
java.lang.Object
org.conscrypt.NativeSslSession
org.conscrypt.NativeSslSession.Impl
- Enclosing class:
NativeSslSession
The session wrapper implementation.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final String
private final AbstractSessionContext
private final String
private final X509Certificate[]
private final byte[]
private final byte[]
private final int
private final String
private final NativeRef.SSL_SESSION
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
Impl
(AbstractSessionContext context, NativeRef.SSL_SESSION ref, String host, int port, X509Certificate[] peerCertificates, byte[] peerOcspStapledResponse, byte[] peerSignedCertificateTimestamp) -
Method Summary
Modifier and TypeMethodDescription(package private) String
private long
(package private) byte[]
getId()
(package private) String
(package private) byte[]
Returns the OCSP stapled response.(package private) int
(package private) byte[]
Returns the signed certificate timestamp (SCT) received from the peer.(package private) String
(package private) boolean
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) SSLSession
Converts this object to aSSLSession
.Methods inherited from class org.conscrypt.NativeSslSession
newInstance, newInstance
-
Field Details
-
ref
-
context
-
host
-
port
private final int port -
protocol
-
cipherSuite
-
peerCertificates
-
peerOcspStapledResponse
private final byte[] peerOcspStapledResponse -
peerSignedCertificateTimestamp
private final byte[] peerSignedCertificateTimestamp
-
-
Constructor Details
-
Impl
private Impl(AbstractSessionContext context, NativeRef.SSL_SESSION ref, String host, int port, X509Certificate[] peerCertificates, byte[] peerOcspStapledResponse, byte[] peerSignedCertificateTimestamp)
-
-
Method Details
-
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
- Specified by:
offerToResume
in classNativeSslSession
- Throws:
SSLException
-
getCipherSuite
String getCipherSuite()- Specified by:
getCipherSuite
in classNativeSslSession
-
getProtocol
String getProtocol()- Specified by:
getProtocol
in classNativeSslSession
-
getPeerHost
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:
-
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:
-
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
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
-