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 Stringprivate final AbstractSessionContextprivate final Stringprivate final X509Certificate[]private final byte[]private final byte[]private final intprivate final Stringprivate final NativeRef.SSL_SESSION -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateImpl(AbstractSessionContext context, NativeRef.SSL_SESSION ref, String host, int port, X509Certificate[] peerCertificates, byte[] peerOcspStapledResponse, byte[] peerSignedCertificateTimestamp) -
Method Summary
Modifier and TypeMethodDescription(package private) Stringprivate 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) booleanReturns whether this session should only ever be used for resumption once.(package private) booleanisValid()(package private) voidofferToResume(NativeSsl ssl) (package private) byte[]toBytes()Converts the given session to bytes.(package private) SSLSessionConverts 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:
getIdin classNativeSslSession
-
getCreationTime
private long getCreationTime() -
isValid
boolean isValid()- Specified by:
isValidin classNativeSslSession
-
isSingleUse
boolean isSingleUse()Description copied from class:NativeSslSessionReturns whether this session should only ever be used for resumption once.- Specified by:
isSingleUsein classNativeSslSession
-
offerToResume
- Specified by:
offerToResumein classNativeSslSession- Throws:
SSLException
-
getCipherSuite
String getCipherSuite()- Specified by:
getCipherSuitein classNativeSslSession
-
getProtocol
String getProtocol()- Specified by:
getProtocolin classNativeSslSession
-
getPeerHost
String getPeerHost()- Specified by:
getPeerHostin classNativeSslSession
-
getPeerPort
int getPeerPort()- Specified by:
getPeerPortin classNativeSslSession
-
getPeerOcspStapledResponse
byte[] getPeerOcspStapledResponse()Description copied from class:NativeSslSessionReturns 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:
getPeerOcspStapledResponsein classNativeSslSession- See Also:
-
getPeerSignedCertificateTimestamp
byte[] getPeerSignedCertificateTimestamp()Description copied from class:NativeSslSessionReturns 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:
getPeerSignedCertificateTimestampin classNativeSslSession- See Also:
-
toBytes
byte[] toBytes()Description copied from class:NativeSslSessionConverts the given session to bytes.- Specified by:
toBytesin classNativeSslSession- Returns:
- session data as bytes or null if the session can't be converted
-
toSSLSession
SSLSession toSSLSession()Description copied from class:NativeSslSessionConverts this object to aSSLSession. The returned session will support only a subset of theSSLSessionAPI.- Specified by:
toSSLSessionin classNativeSslSession
-