Class OpenSSLSessionContext
- java.lang.Object
-
- org.apache.tomcat.util.net.openssl.OpenSSLSessionContext
-
- All Implemented Interfaces:
javax.net.ssl.SSLSessionContext
public class OpenSSLSessionContext extends java.lang.Object implements javax.net.ssl.SSLSessionContext
OpenSSL specificSSLSessionContext
implementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.util.Enumeration<byte[]>
getIds()
javax.net.ssl.SSLSession
getSession(byte[] bytes)
int
getSessionCacheSize()
int
getSessionTimeout()
boolean
isSessionCacheEnabled()
void
setSessionCacheEnabled(boolean enabled)
Enable or disable caching of SSL sessions.void
setSessionCacheSize(int size)
boolean
setSessionIdContext(byte[] sidCtx)
Set the context within which session be reused (server side only) See man SSL_CTX_set_session_id_contextvoid
setSessionTimeout(int seconds)
void
setTicketKeys(byte[] keys)
Sets the SSL session ticket keys of this context.OpenSSLSessionStats
stats()
-
-
-
Method Detail
-
getSession
public javax.net.ssl.SSLSession getSession(byte[] bytes)
- Specified by:
getSession
in interfacejavax.net.ssl.SSLSessionContext
-
getIds
public java.util.Enumeration<byte[]> getIds()
- Specified by:
getIds
in interfacejavax.net.ssl.SSLSessionContext
-
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
-true
to enable caching,false
to disable
-
isSessionCacheEnabled
public boolean isSessionCacheEnabled()
- Returns:
true
if caching of SSL sessions is enabled,false
otherwise.
-
stats
public OpenSSLSessionStats stats()
- Returns:
- The statistics for this context.
-
setSessionTimeout
public void setSessionTimeout(int seconds)
- Specified by:
setSessionTimeout
in interfacejavax.net.ssl.SSLSessionContext
-
getSessionTimeout
public int getSessionTimeout()
- Specified by:
getSessionTimeout
in interfacejavax.net.ssl.SSLSessionContext
-
setSessionCacheSize
public void setSessionCacheSize(int size)
- Specified by:
setSessionCacheSize
in interfacejavax.net.ssl.SSLSessionContext
-
getSessionCacheSize
public int getSessionCacheSize()
- Specified by:
getSessionCacheSize
in interfacejavax.net.ssl.SSLSessionContext
-
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:
true
if success,false
otherwise.
-
-