24 #ifndef MBEDTLS_SSL_CACHE_H
25 #define MBEDTLS_SSL_CACHE_H
29 #if defined(MBEDTLS_THREADING_C)
41 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT)
42 #define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT 86400
45 #if !defined(MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES)
46 #define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES 50
63 #if defined(MBEDTLS_HAVE_TIME)
67 #if defined(MBEDTLS_X509_CRT_PARSE_C)
81 #if defined(MBEDTLS_THREADING_C)
82 mbedtls_threading_mutex_t mutex;
111 #if defined(MBEDTLS_HAVE_TIME)
mbedtls_x509_buf peer_cert
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))
mbedtls_ssl_cache_entry * chain
Type-length-value structure that allows for ASN1 using DER.
Threading abstraction layer.
void mbedtls_ssl_cache_set_max_entries(mbedtls_ssl_cache_context *cache, int max)
Set the cache timeout (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache)
Initialize an SSL cache context.
int mbedtls_ssl_cache_get(void *data, mbedtls_ssl_session *session)
Cache get callback implementation (Thread-safe if MBEDTLS_THREADING_C is enabled) ...
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_free(mbedtls_ssl_cache_context *cache)
Free referenced items in a cache context and clear memory.
This structure is used for storing cache entries.
mbedtls_ssl_cache_entry * next
mbedtls_ssl_session session