ssl_cookie.h
mbedtls/private_access.h
mbedtls/build_info.h
mbedtls/ssl.h
mbedtls/threading.h
mbedtls/asn1.h
mbedtls/bignum.h
mbedtls/build_info.h
mbedtls/ccm.h
mbedtls/chacha20.h
mbedtls/chachapoly.h
mbedtls/check_config.h
mbedtls/cipher.h
mbedtls/cmac.h
mbedtls/config_adjust_legacy_crypto.h
mbedtls/config_adjust_psa_from_legacy.h
mbedtls/config_adjust_psa_superset_legacy.h
mbedtls/config_adjust_ssl.h
mbedtls/config_adjust_x509.h
mbedtls/config_psa.h
mbedtls/dhm.h
mbedtls/ecdh.h
mbedtls/ecdsa.h
mbedtls/ecjpake.h
mbedtls/ecp.h
mbedtls/gcm.h
mbedtls/mbedtls_config.h
mbedtls/md.h
mbedtls/md5.h
mbedtls/pk.h
mbedtls/platform_time.h
mbedtls/platform_util.h
mbedtls/poly1305.h
mbedtls/private_access.h
mbedtls/ripemd160.h
mbedtls/rsa.h
mbedtls/sha1.h
mbedtls/sha256.h
mbedtls/sha3.h
mbedtls/sha512.h
mbedtls/ssl.h
mbedtls/ssl_ciphersuites.h
ssl_cookie.h
mbedtls/threading.h
mbedtls/x509.h
mbedtls/x509_crl.h
mbedtls/x509_crt.h
psa/build_info.h
psa/crypto.h
psa/crypto_adjust_auto_enabled.h
psa/crypto_adjust_config_dependencies.h
psa/crypto_adjust_config_key_pair_types.h
psa/crypto_adjust_config_synonyms.h
psa/crypto_builtin_composites.h
psa/crypto_builtin_key_derivation.h
psa/crypto_builtin_primitives.h
crypto_compat.h
psa/crypto_driver_common.h
psa/crypto_driver_contexts_composites.h
psa/crypto_driver_contexts_key_derivation.h
psa/crypto_driver_contexts_primitives.h
crypto_extra.h
psa/crypto_legacy.h
crypto_platform.h
crypto_sizes.h
crypto_struct.h
crypto_types.h
crypto_values.h
inttypes.h
limits.h
pthread.h
stddef.h
stdint.h
stdio.h
stdlib.h
time.h
mbedtls_ssl_cookie_ctx
SECTION: Module settings

The configuration options you can set for this module are in this section. Either change them in mbedtls_config.h or define them on the compiler command line.

MBEDTLS_SSL_COOKIE_TIMEOUT
60

Default expiration delay of DTLS cookies, in seconds if HAVE_TIME, or in number of cookies issued

struct mbedtls_ssl_cookie_ctx typedef struct mbedtls_ssl_cookie_ctx mbedtls_ssl_cookie_ctx mbedtls_ssl_cookie_ctx

Context for the default cookie functions.

mbedtls_ssl_cookie_write_t mbedtls_ssl_cookie_write_t mbedtls_ssl_cookie_write mbedtls_ssl_cookie_write

Generate cookie, see `mbedtls_ssl_cookie_write_t`.

mbedtls_ssl_cookie_check_t mbedtls_ssl_cookie_check_t mbedtls_ssl_cookie_check mbedtls_ssl_cookie_check

Verify cookie, see `mbedtls_ssl_cookie_write_t`.

void void mbedtls_ssl_cookie_init (mbedtls_ssl_cookie_ctx *ctx) mbedtls_ssl_cookie_init mbedtls_ssl_cookie_ctx * ctx

Initialize cookie context.

int int mbedtls_ssl_cookie_setup (mbedtls_ssl_cookie_ctx *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng) mbedtls_ssl_cookie_setup mbedtls_ssl_cookie_ctx * ctx int(*)(void *, unsigned char *, size_t) f_rng void * p_rng

Setup cookie context (generate keys)

void void mbedtls_ssl_cookie_set_timeout (mbedtls_ssl_cookie_ctx *ctx, unsigned long delay) mbedtls_ssl_cookie_set_timeout mbedtls_ssl_cookie_ctx * ctx unsigned long delay

Set expiration delay for cookies (Default MBEDTLS_SSL_COOKIE_TIMEOUT)

ctx

Cookie context

delay

Delay, in seconds if HAVE_TIME, or in number of cookies issued in the meantime. 0 to disable expiration (NOT recommended)

void void mbedtls_ssl_cookie_free (mbedtls_ssl_cookie_ctx *ctx) mbedtls_ssl_cookie_free mbedtls_ssl_cookie_ctx * ctx

Free cookie context.

DTLS cookie callbacks implementation.

    /*
    *CopyrightTheMbedTLSContributors
    *SPDX-License-Identifier:Apache-2.0ORGPL-2.0-or-later
    */
    #ifndefMBEDTLS_SSL_COOKIE_H
    #defineMBEDTLS_SSL_COOKIE_H
    #include"mbedtls/private_access.h"

    #include"mbedtls/build_info.h"

    #include"mbedtls/ssl.h"

    #if!defined(MBEDTLS_USE_PSA_CRYPTO)
    #ifdefined(MBEDTLS_THREADING_C)
    #include"mbedtls/threading.h"
    #endif
    #endif/*!MBEDTLS_USE_PSA_CRYPTO*/

    #ifndefMBEDTLS_SSL_COOKIE_TIMEOUT
    #defineMBEDTLS_SSL_COOKIE_TIMEOUT60
    #endif

    #ifdef__cplusplus
    extern"C"{
    #endif

    typedefstructmbedtls_ssl_cookie_ctx{
    #ifdefined(MBEDTLS_USE_PSA_CRYPTO)
    mbedtls_svc_key_id_tMBEDTLS_PRIVATE(psa_hmac_key);
    psa_algorithm_tMBEDTLS_PRIVATE(psa_hmac_alg);
    #else
    mbedtls_md_context_tMBEDTLS_PRIVATE(hmac_ctx);
    #endif/*MBEDTLS_USE_PSA_CRYPTO*/
    #if!defined(MBEDTLS_HAVE_TIME)
    unsignedlongMBEDTLS_PRIVATE(serial);
    #endif
    unsignedlongMBEDTLS_PRIVATE(timeout);
    #if!defined(MBEDTLS_USE_PSA_CRYPTO)
    #ifdefined(MBEDTLS_THREADING_C)
    mbedtls_threading_mutex_tMBEDTLS_PRIVATE(mutex);
    #endif
    #endif/*!MBEDTLS_USE_PSA_CRYPTO*/
    }mbedtls_ssl_cookie_ctx;

    voidmbedtls_ssl_cookie_init(mbedtls_ssl_cookie_ctx*ctx);

    intmbedtls_ssl_cookie_setup(mbedtls_ssl_cookie_ctx*ctx,
    int(*f_rng)(void*,unsignedchar*,size_t),
    void*p_rng);

    voidmbedtls_ssl_cookie_set_timeout(mbedtls_ssl_cookie_ctx*ctx,unsignedlongdelay);

    voidmbedtls_ssl_cookie_free(mbedtls_ssl_cookie_ctx*ctx);

    mbedtls_ssl_cookie_write_tmbedtls_ssl_cookie_write;

    mbedtls_ssl_cookie_check_tmbedtls_ssl_cookie_check;

    #ifdef__cplusplus
    }
    #endif

    #endif/*ssl_cookie.h*/