Class OpenSslSessionContext

    • Method Detail

      • useKeyManager

        final boolean useKeyManager()
      • setSessionCacheSize

        public void setSessionCacheSize​(int size)
        Specified by:
        setSessionCacheSize in interface javax.net.ssl.SSLSessionContext
      • getSessionCacheSize

        public int getSessionCacheSize()
        Specified by:
        getSessionCacheSize in interface javax.net.ssl.SSLSessionContext
      • setSessionTimeout

        public void setSessionTimeout​(int seconds)
        Specified by:
        setSessionTimeout in interface javax.net.ssl.SSLSessionContext
      • getSessionTimeout

        public int getSessionTimeout()
        Specified by:
        getSessionTimeout in interface javax.net.ssl.SSLSessionContext
      • getSession

        public javax.net.ssl.SSLSession getSession​(byte[] bytes)
        Specified by:
        getSession in interface javax.net.ssl.SSLSessionContext
      • getIds

        public java.util.Enumeration<byte[]> getIds()
        Specified by:
        getIds in interface javax.net.ssl.SSLSessionContext
      • setTicketKeys

        public void setTicketKeys​(OpenSslSessionTicketKey... keys)
        Sets the SSL session ticket keys of this context. Depending on the underlying native library you may omit the argument or pass an empty array and so let the native library handle the key generation and rotating for you. If this is supported by the underlying native library should be checked in this case. For example BoringSSL is known to support this.
      • setSessionCacheEnabled

        public void setSessionCacheEnabled​(boolean enabled)
        Enable or disable caching of SSL sessions.
      • isSessionCacheEnabled

        public boolean isSessionCacheEnabled()
        Return true if caching of SSL sessions is enabled, false otherwise.
      • removeFromCache

        final void removeFromCache​(OpenSslSessionId id)
        Remove the given OpenSslSession from the cache, and so not re-use it for new connections.
      • setSessionFromCache

        void setSessionFromCache​(java.lang.String host,
                                 int port,
                                 long ssl)
      • destroy

        final void destroy()