Class SSLSession

java.lang.Object
io.netty.internal.tcnative.SSLSession

public final class SSLSession extends Object
Methods to operate on a SSL_SESSION.
  • Constructor Details

    • SSLSession

      private SSLSession()
  • Method Details

    • getTime

      public static long getTime(long session)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
      Returns:
      returns the time at which the session was established. The time is given in seconds since the Epoch
    • getTimeout

      public static long getTimeout(long session)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
      Returns:
      returns the timeout for the session. The time is given in seconds since the Epoch
    • setTimeout

      public static long setTimeout(long session, long seconds)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
      seconds - timeout in seconds
      Returns:
      returns the timeout for the session before this call. The time is given in seconds since the Epoch
    • getSessionId

      public static byte[] getSessionId(long session)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
      Returns:
      the session id as byte array representation obtained via SSL_SESSION_get_id.
    • upRef

      public static boolean upRef(long session)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
      Returns:
      true if successful, false otherwise.
    • free

      public static void free(long session)
      Parameters:
      session - the SSL_SESSION instance (SSL_SESSION *)
    • shouldBeSingleUse

      public static boolean shouldBeSingleUse(long session)
      Will return true if the session should only re-used once. See SSL_SESSION_should_be_single_use.
      Parameters:
      session -
      Returns:
      true if the session should be re-used once only, false otherwise.