Package io.netty.internal.tcnative
Interface SSLSessionCache
-
public interface SSLSessionCacheAllows to implement a custom externalSSL_SESSIONcache. 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
All Methods Instance Methods Abstract Methods Modifier and Type Method Description longgetSession(long sslCtx, byte[] sessionId)Called once aSSL_SESSIONshould be retrieved for the givenSSLand with the given session ID.booleansessionCreated(long ssl, long sslSession)Returnstrueif the cache takes ownership of theSSL_SESSIONand will callSSL_SESSION_freeonce it should be destroyed,falseotherwise.
-
-
-
Method Detail
-
sessionCreated
boolean sessionCreated(long ssl, long sslSession)Returnstrueif the cache takes ownership of theSSL_SESSIONand will callSSL_SESSION_freeonce it should be destroyed,falseotherwise. See SSL_CTX_sess_set_new_cb.- Parameters:
ssl-SSL*sslSession-SSL_SESSION*- Returns:
trueif session ownership was transfered,falseif not.
-
getSession
long getSession(long sslCtx, byte[] sessionId)Called once aSSL_SESSIONshould be retrieved for the givenSSLand 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_SESSIONs once the cache is destroyed viaSSLSession.free(long).- Parameters:
sslCtx- {code SSL_CTX*}sessionId- the session id- Returns:
- the
SSL_SESSIONor-1if none was found in the cache.
-
-