22#ifndef MBEDTLS_SSL_CACHE_H
23#define MBEDTLS_SSL_CACHE_H
25#if !defined(MBEDTLS_CONFIG_FILE)
28#include MBEDTLS_CONFIG_FILE
33#if defined(MBEDTLS_THREADING_C)
50#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT)
51#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400
54#if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES)
55#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50
72#if defined(MBEDTLS_HAVE_TIME)
73 mbedtls_time_t timestamp;
76#if defined(MBEDTLS_X509_CRT_PARSE_C) && \
77 defined(MBEDTLS_SSL_KEEP_PEER_CERTIFICATE)
91#if defined(MBEDTLS_THREADING_C)
92 mbedtls_threading_mutex_t mutex;
121#if defined(MBEDTLS_HAVE_TIME)
Configuration options (set of defines)
int mbedtls_ssl_cache_set(void *data, const mbedtls_ssl_session *session)
Cache set callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled)
void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache)
Initialize an SSL cache context.
void mbedtls_ssl_cache_free(mbedtls_ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
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))
int mbedtls_ssl_cache_get(void *data, mbedtls_ssl_session *session)
Cache get callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled)
Type-length-value structure that allows for ASN1 using DER.
mbedtls_ssl_cache_entry * chain
This structure is used for storing cache entries.
mbedtls_ssl_cache_entry * next
mbedtls_ssl_session session
Threading abstraction layer.