Documentation

Documentation

Includes

config.h

#include "config.h"
#include "config.h"

MBEDTLS_CONFIG_FILE

#include MBEDTLS_CONFIG_FILE
#include MBEDTLS_CONFIG_FILE

ssl.h

#include "ssl.h"
#include "ssl.h"

threading.h

#include "threading.h"
#include "threading.h"

Macros

Marco MBEDTLS_SSL_CACHE_H

#define MBEDTLS_SSL_CACHE_H


      

Marco MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT

#define MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT      86400  /*!< 1 day  */


      

Marco MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES

#define MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES     50  /*!< Maximum entries in cache */

      

Functions

Func mbedtls_ssl_cache_init

void mbedtls_ssl_cache_init( mbedtls_ssl_cache_context *cache );
/**
 * \brief          Initialize an SSL cache context
 *
 * \param cache    SSL cache context
 */

Func mbedtls_ssl_cache_get

int mbedtls_ssl_cache_get( void *data, mbedtls_ssl_session *session );
/**
 * \brief          Cache get callback implementation
 *                 (Thread-safe if MBEDTLS_THREADING_C is enabled)
 *
 * \param data     SSL cache context
 * \param session  session to retrieve entry for
 */

Func mbedtls_ssl_cache_set

int mbedtls_ssl_cache_set( void *data, const mbedtls_ssl_session *session );
/**
 * \brief          Cache set callback implementation
 *                 (Thread-safe if MBEDTLS_THREADING_C is enabled)
 *
 * \param data     SSL cache context
 * \param session  session to store entry for
 */

Func mbedtls_ssl_cache_set_timeout

void mbedtls_ssl_cache_set_timeout( mbedtls_ssl_cache_context *cache, int timeout );
/**
 * \brief          Set the cache timeout
 *                 (Default: MBEDTLS_SSL_CACHE_DEFAULT_TIMEOUT (1 day))
 *
 *                 A timeout of 0 indicates no timeout.
 *
 * \param cache    SSL cache context
 * \param timeout  cache entry timeout in seconds
 */

Func mbedtls_ssl_cache_set_max_entries

void mbedtls_ssl_cache_set_max_entries( mbedtls_ssl_cache_context *cache, int max );
/**
 * \brief          Set the maximum number of cache entries
 *                 (Default: MBEDTLS_SSL_CACHE_DEFAULT_MAX_ENTRIES (50))
 *
 * \param cache    SSL cache context
 * \param max      cache entry maximum
 */

Func mbedtls_ssl_cache_free

void mbedtls_ssl_cache_free( mbedtls_ssl_cache_context *cache );
/**
 * \brief          Free referenced items in a cache context and clear memory
 *
 * \param cache    SSL cache context
 */

Vars

Consts

Types

Typedefs

Typedef mbedtls_ssl_cache_context

typedef struct mbedtls_ssl_cache_context mbedtls_ssl_cache_context;


      

Typedef mbedtls_ssl_cache_entry

typedef struct mbedtls_ssl_cache_entry mbedtls_ssl_cache_entry;