Package io.netty.internal.tcnative
Interface SSLSessionCache
public interface SSLSessionCache
Allows to implement a custom external
SSL_SESSION
cache.
See SSL_CTX_sess_set_get_cb.html
and {a href="https://www.openssl.org/docs/man1.1.0/man3/SSL_CTX_set_session_cache_mode.html">SSL_CTX_set_session_cache_mode.-
Method Summary
Modifier and TypeMethodDescriptionlong
getSession
(long sslCtx, byte[] sessionId) Called once aSSL_SESSION
should be retrieved for the givenSSL
and with the given session ID.boolean
sessionCreated
(long ssl, long sslSession) Returnstrue
if the cache takes ownership of theSSL_SESSION
and will callSSL_SESSION_free
once it should be destroyed,false
otherwise.
-
Method Details
-
sessionCreated
boolean sessionCreated(long ssl, long sslSession) Returnstrue
if the cache takes ownership of theSSL_SESSION
and will callSSL_SESSION_free
once it should be destroyed,false
otherwise. See SSL_CTX_sess_set_new_cb.- Parameters:
ssl
-SSL*
sslSession
-SSL_SESSION*
- Returns:
true
if session ownership was transfered,false
if not.
-
getSession
long getSession(long sslCtx, byte[] sessionId) Called once aSSL_SESSION
should be retrieved for the givenSSL
and with the given session ID. See SSL_CTX_sess_set_get_cb. If the session is shared you need to callSSLSession.upRef(long)
explicit in this callback and explicit free allSSL_SESSION
s once the cache is destroyed viaSSLSession.free(long)
.- Parameters:
sslCtx
- {code SSL_CTX*}sessionId
- the session id- Returns:
- the
invalid reference
SSL_SESSION
-1
if none was found in the cache.
-