Class OpenSSLSessionContext
- java.lang.Object
-
- org.apache.tomcat.util.net.openssl.OpenSSLSessionContext
-
- All Implemented Interfaces:
SSLSessionContext
public class OpenSSLSessionContext extends Object implements SSLSessionContext
OpenSSL specificSSLSessionContextimplementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Enumeration<byte[]>getIds()SSLSessiongetSession(byte[] bytes)intgetSessionCacheSize()intgetSessionTimeout()booleanisSessionCacheEnabled()voidsetSessionCacheEnabled(boolean enabled)Enable or disable caching of SSL sessions.voidsetSessionCacheSize(int size)booleansetSessionIdContext(byte[] sidCtx)Set the context within which session be reused (server side only) See man SSL_CTX_set_session_id_contextvoidsetSessionTimeout(int seconds)voidsetTicketKeys(byte[] keys)Sets the SSL session ticket keys of this context.OpenSSLSessionStatsstats()
-
-
-
Method Detail
-
getSession
public SSLSession getSession(byte[] bytes)
- Specified by:
getSessionin interfaceSSLSessionContext
-
getIds
public Enumeration<byte[]> getIds()
- Specified by:
getIdsin interfaceSSLSessionContext
-
setTicketKeys
public void setTicketKeys(byte[] keys)
Sets the SSL session ticket keys of this context.- Parameters:
keys- The session ticket keys
-
setSessionCacheEnabled
public void setSessionCacheEnabled(boolean enabled)
Enable or disable caching of SSL sessions.- Parameters:
enabled-trueto enable caching,falseto disable
-
isSessionCacheEnabled
public boolean isSessionCacheEnabled()
- Returns:
trueif caching of SSL sessions is enabled,falseotherwise.
-
stats
public OpenSSLSessionStats stats()
- Returns:
- The statistics for this context.
-
setSessionTimeout
public void setSessionTimeout(int seconds)
- Specified by:
setSessionTimeoutin interfaceSSLSessionContext
-
getSessionTimeout
public int getSessionTimeout()
- Specified by:
getSessionTimeoutin interfaceSSLSessionContext
-
setSessionCacheSize
public void setSessionCacheSize(int size)
- Specified by:
setSessionCacheSizein interfaceSSLSessionContext
-
getSessionCacheSize
public int getSessionCacheSize()
- Specified by:
getSessionCacheSizein interfaceSSLSessionContext
-
setSessionIdContext
public boolean setSessionIdContext(byte[] sidCtx)
Set the context within which session be reused (server side only) See man SSL_CTX_set_session_id_context- Parameters:
sidCtx- can be any kind of binary data, it is therefore possible to use e.g. the name of the application and/or the hostname and/or service name- Returns:
trueif success,falseotherwise.
-
-