接口 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.
-
-
方法概要
所有方法 实例方法 抽象方法 修饰符和类型 方法 说明 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.
-
-
-
方法详细资料
-
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.- 参数:
ssl-SSL*sslSession-SSL_SESSION*- 返回:
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).- 参数:
sslCtx- {code SSL_CTX*}sessionId- the session id- 返回:
- the
SSL_SESSIONor-1if none was found in the cache.
-
-