Class OpenSSLServerSessionContext

java.lang.Object
org.wildfly.openssl.OpenSSLServerSessionContext
All Implemented Interfaces:
SSLSessionContext

public final class OpenSSLServerSessionContext extends Object
OpenSSLSessionContext implementation which offers extra methods which are only useful for the server-side.
  • Field Details

    • sessions

      protected final Map<org.wildfly.openssl.OpenSSLSessionContext.Key,org.wildfly.openssl.OpenSSlSession> sessions
  • Method Details

    • setSessionTimeout

      public void setSessionTimeout(int seconds)
    • getSessionTimeout

      public int getSessionTimeout()
    • setSessionCacheSize

      public void setSessionCacheSize(int size)
    • getSessionCacheSize

      public int getSessionCacheSize()
    • setSessionCacheEnabled

      public void setSessionCacheEnabled(boolean enabled)
    • isSessionCacheEnabled

      public boolean isSessionCacheEnabled()
    • setSessionIdContext

      public boolean setSessionIdContext(byte[] sidCtx)
      Set the context within which session be reused (server side only) See man SSL_CTX_set_session_id_context
      Parameters:
      sidCtx - can be any kind of binary data, it is therefore possible to use e.g. the name of the application and/or the hostname and/or service name
      Returns:
      true if success, false otherwise.
    • getSession

      public SSLSession getSession(byte[] bytes)
      Specified by:
      getSession in interface SSLSessionContext
    • getIds

      public Enumeration<byte[]> getIds()
      Specified by:
      getIds in interface SSLSessionContext
    • setTicketKeys

      public void setTicketKeys(byte[] keys)
      Sets the SSL session ticket keys of this context.
    • stats

      public OpenSSLSessionStats stats()
      Returns the stats of this context.
    • mergeHandshakeSession

      public void mergeHandshakeSession(SSLSession handshakeSession, byte[] sessionId)
    • clientSessionCreated

      protected void clientSessionCreated(long ssl, long sessionPointer, byte[] sessionId)