Interface OpenSslInternalSession

All Superinterfaces:
OpenSslSession, SSLSession
All Known Implementing Classes:
ExtendedOpenSslSession, OpenSslSessionCache.NativeSslSession, ReferenceCountedOpenSslEngine.DefaultOpenSslSession

interface OpenSslInternalSession extends OpenSslSession
SSLSession that is specific to our native implementation.
  • Method Details

    • prepareHandshake

      void prepareHandshake()
      Called on a handshake session before being exposed to a TrustManager. Session data must be cleared by this call.
    • sessionId

      OpenSslSessionId sessionId()
      Return the OpenSslSessionId that can be used to identify this session.
    • setLocalCertificate

      void setLocalCertificate(Certificate[] localCertificate)
      Set the local certificate chain that is used. It is not expected that this array will be changed at all and so its ok to not copy the array.
    • setSessionDetails

      void setSessionDetails(long creationTime, long lastAccessedTime, OpenSslSessionId id, Map<String,Object> keyValueStorage)
      Set the details for the session which might come from a cache.
      Parameters:
      creationTime - the time at which the session was created.
      lastAccessedTime - the time at which the session was last accessed via the session infrastructure (cache).
      id - the OpenSslSessionId
      keyValueStorage - the key value store. See keyValueStorage().
    • keyValueStorage

      Map<String,Object> keyValueStorage()
      Return the underlying Map that is used by the following methods: The Map must be thread-safe!
      Returns:
      storage
    • setLastAccessedTime

      void setLastAccessedTime(long time)
      Set the last access time which will be returned by SSLSession.getLastAccessedTime().
      Parameters:
      time - the time
    • tryExpandApplicationBufferSize

      void tryExpandApplicationBufferSize(int packetLengthDataOnly)
      Expand (or increase) the value returned by SSLSession.getApplicationBufferSize() if necessary.

      This is only called in a synchronized block, so no need to use atomic operations.

      Parameters:
      packetLengthDataOnly - The packet size which exceeds the current SSLSession.getApplicationBufferSize().
    • handshakeFinished

      void handshakeFinished(byte[] id, String cipher, String protocol, byte[] peerCertificate, byte[][] peerCertificateChain, long creationTime, long timeout) throws SSLException
      Called once the handshake has completed.
      Throws:
      SSLException