Top Description Methods
io.netty.internal.tcnative

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 TypeMethod and Description
public long

Returns:

the SSL_SESSION or -1 if none was found in the cache.
getSession
(long
{code SSL_CTX*}
sslCtx
,
byte[]
the session id
sessionId
)

Called once a SSL_SESSION should be retrieved for the given SSL and with the given session ID. See SSL_CTX_sess_set_get_cb.

public boolean

Returns:

true if session ownership was transfered, false if not.
sessionCreated
(long
SSL*
ssl
,
long
SSL_SESSION*
sslSession
)

Returns true if the cache takes ownership of the SSL_SESSION and will call SSL_SESSION_free once it should be destroyed, false otherwise.

Method Detail

getSessionback to summary
public long getSession(long sslCtx, byte[] sessionId)

Called once a SSL_SESSION should be retrieved for the given SSL and with the given session ID. See SSL_CTX_sess_set_get_cb. If the session is shared you need to call SSLSession#upRef(long) explicit in this callback and explicit free all SSL_SESSIONs once the cache is destroyed via SSLSession#free(long).

Parameters
sslCtx:long

{code SSL_CTX*}

sessionId:byte[]

the session id

Returns:long

the SSL_SESSION or -1 if none was found in the cache.

sessionCreatedback to summary
public boolean sessionCreated(long ssl, long sslSession)

Returns true if the cache takes ownership of the SSL_SESSION and will call SSL_SESSION_free once it should be destroyed, false otherwise. See SSL_CTX_sess_set_new_cb.

Parameters
ssl:long

SSL*

sslSession:long

SSL_SESSION*

Returns:boolean

true if session ownership was transfered, false if not.