#include "common.h"
#if defined(MBEDTLS_SSL_CACHE_C)
#include "mbedtls/platform.h"
#include "mbedtls/ssl_cache.h"
#include "ssl_misc.h"
#include "mbedtls/error.h"
#include <string.h>
void mbedtls_ssl_cache_init(mbedtls_ssl_cache_context *cache)
{ … }
MBEDTLS_CHECK_RETURN_CRITICAL
static int ssl_cache_find_entry(mbedtls_ssl_cache_context *cache,
unsigned char const *session_id,
size_t session_id_len,
mbedtls_ssl_cache_entry **dst)
{ … }
int mbedtls_ssl_cache_get(void *data,
unsigned char const *session_id,
size_t session_id_len,
mbedtls_ssl_session *session)
{ … }
static void ssl_cache_entry_zeroize(mbedtls_ssl_cache_entry *entry)
{ … }
MBEDTLS_CHECK_RETURN_CRITICAL
static int ssl_cache_pick_writing_slot(mbedtls_ssl_cache_context *cache,
unsigned char const *session_id,
size_t session_id_len,
mbedtls_ssl_cache_entry **dst)
{ … }
int mbedtls_ssl_cache_set(void *data,
unsigned char const *session_id,
size_t session_id_len,
const mbedtls_ssl_session *session)
{ … }
int mbedtls_ssl_cache_remove(void *data,
unsigned char const *session_id,
size_t session_id_len)
{ … }
#if defined(MBEDTLS_HAVE_TIME)
void mbedtls_ssl_cache_set_timeout(mbedtls_ssl_cache_context *cache, int timeout)
{ … }
#endif
void mbedtls_ssl_cache_set_max_entries(mbedtls_ssl_cache_context *cache, int max)
{ … }
void mbedtls_ssl_cache_free(mbedtls_ssl_cache_context *cache)
{ … }
#endif