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.StringcipherSuiteprivate AbstractSessionContextcontextprivate java.lang.Stringhostprivate java.security.cert.X509Certificate[]peerCertificatesprivate byte[]peerOcspStapledResponseprivate byte[]peerSignedCertificateTimestampprivate intportprivate java.lang.Stringprotocolprivate NativeRef.SSL_SESSIONref
-
Constructor Summary
Constructors Modifier Constructor Description privateImpl(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.StringgetCipherSuite()private longgetCreationTime()(package private) byte[]getId()(package private) java.lang.StringgetPeerHost()(package private) byte[]getPeerOcspStapledResponse()Returns the OCSP stapled response.(package private) intgetPeerPort()(package private) byte[]getPeerSignedCertificateTimestamp()Returns the signed certificate timestamp (SCT) received from the peer.(package private) java.lang.StringgetProtocol()(package private) booleanisSingleUse()Returns 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) javax.net.ssl.SSLSessiontoSSLSession()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:
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
void offerToResume(NativeSsl ssl) throws javax.net.ssl.SSLException
- Specified by:
offerToResumein classNativeSslSession- Throws:
javax.net.ssl.SSLException
-
getCipherSuite
java.lang.String getCipherSuite()
- Specified by:
getCipherSuitein classNativeSslSession
-
getProtocol
java.lang.String getProtocol()
- Specified by:
getProtocolin classNativeSslSession
-
getPeerHost
java.lang.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:
- RFC 6066, RFC 6961
-
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:
- RFC 6962
-
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
javax.net.ssl.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
-
-