- java.lang.Object
-
- io.netty5.handler.ssl.OpenSslSessionContext
-
- All Implemented Interfaces:
SSLSessionContext
- Direct Known Subclasses:
OpenSslServerSessionContext
public abstract class OpenSslSessionContext extends Object implements SSLSessionContext
OpenSSL specificSSLSessionContext
implementation.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description Enumeration<byte[]>
getIds()
SSLSession
getSession(byte[] bytes)
int
getSessionCacheSize()
int
getSessionTimeout()
boolean
isSessionCacheEnabled()
Returntrue
if caching of SSL sessions is enabled,false
otherwise.void
setSessionCacheEnabled(boolean enabled)
Enable or disable caching of SSL sessions.void
setSessionCacheSize(int size)
void
setSessionTimeout(int seconds)
void
setTicketKeys(byte[] keys)
Deprecated.void
setTicketKeys(OpenSslSessionTicketKey... keys)
Sets the SSL session ticket keys of this context.OpenSslSessionStats
stats()
Returns the stats of this context.
-
-
-
Method Detail
-
setSessionCacheSize
public void setSessionCacheSize(int size)
- Specified by:
setSessionCacheSize
in interfaceSSLSessionContext
-
getSessionCacheSize
public int getSessionCacheSize()
- Specified by:
getSessionCacheSize
in interfaceSSLSessionContext
-
setSessionTimeout
public void setSessionTimeout(int seconds)
- Specified by:
setSessionTimeout
in interfaceSSLSessionContext
-
getSessionTimeout
public int getSessionTimeout()
- Specified by:
getSessionTimeout
in interfaceSSLSessionContext
-
getSession
public SSLSession getSession(byte[] bytes)
- Specified by:
getSession
in interfaceSSLSessionContext
-
getIds
public Enumeration<byte[]> getIds()
- Specified by:
getIds
in interfaceSSLSessionContext
-
setTicketKeys
@Deprecated public void setTicketKeys(byte[] keys)
Deprecated.Sets the SSL session ticket keys of this context.
-
setTicketKeys
public void setTicketKeys(OpenSslSessionTicketKey... keys)
Sets the SSL session ticket keys of this context. Depending on the underlying native library you may omit the argument or pass an empty array and so let the native library handle the key generation and rotating for you. If this is supported by the underlying native library should be checked in this case. For example BoringSSL is known to support this.
-
setSessionCacheEnabled
public void setSessionCacheEnabled(boolean enabled)
Enable or disable caching of SSL sessions.
-
isSessionCacheEnabled
public boolean isSessionCacheEnabled()
Returntrue
if caching of SSL sessions is enabled,false
otherwise.
-
stats
public OpenSslSessionStats stats()
Returns the stats of this context.
-
-