22 #ifndef MBEDTLS_SSL_CACHE_H
23 #define MBEDTLS_SSL_CACHE_H
30 #if defined(MBEDTLS_THREADING_C)
42 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT)
43 #define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400
46 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES)
47 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50
64 #if defined(MBEDTLS_HAVE_TIME)
85 #if defined(MBEDTLS_THREADING_C)
109 unsigned char const *session_id,
110 size_t session_id_len,
124 unsigned char const *session_id,
125 size_t session_id_len,
128 #if defined(MBEDTLS_HAVE_TIME)
#define MBEDTLS_PRIVATE(member)
void mbedtls_ssl_cache_set_timeout(mbedtls_ssl_cache_context *cache, int timeout)
Set the cache timeout (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day))
Threading abstraction layer.
void mbedtls_ssl_cache_set_max_entries(mbedtls_ssl_cache_context *cache, int max)
Set the maximum number of cache entries (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50)) ...
void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache)
Initialize an SSL cache context.
Macro wrapper for struct's memebrs.
void mbedtls_ssl_cache_free(mbedtls_ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
This structure is used for storing cache entries.
Build-time configuration info.
int mbedtls_ssl_cache_get(void *data, unsigned char const *session_id, size_t session_id_len, mbedtls_ssl_session *session)
Cache get callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled) ...
int mbedtls_ssl_cache_set(void *data, unsigned char const *session_id, size_t session_id_len, const mbedtls_ssl_session *session)
Cache set callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled) ...