23 #ifndef MBEDTLS_SSL_COOKIE_H 24 #define MBEDTLS_SSL_COOKIE_H 28 #if defined(MBEDTLS_THREADING_C) 39 #ifndef MBEDTLS_SSL_COOKIE_TIMEOUT 40 #define MBEDTLS_SSL_COOKIE_TIMEOUT 60 55 #if !defined(MBEDTLS_HAVE_TIME) 61 #if defined(MBEDTLS_THREADING_C) 62 mbedtls_threading_mutex_t
mutex;
75 int (*f_rng)(
void *,
unsigned char *,
size_t),
void mbedtls_ssl_cookie_init(mbedtls_ssl_cookie_ctx *ctx)
Initialize cookie context.
Definition: ssl_cookie.c:75
Threading abstraction layer.
int mbedtls_ssl_cookie_write_t(void *ctx, unsigned char **p, unsigned char *end, const unsigned char *info, size_t ilen)
Callback type: generate a cookie.
Definition: ssl.h:1308
mbedtls_md_context_t hmac_ctx
Definition: ssl_cookie.h:54
static sys_sem mutex
Definition: memp.c:120
int mbedtls_ssl_cookie_check_t(void *ctx, const unsigned char *cookie, size_t clen, const unsigned char *info, size_t ilen)
Callback type: verify a cookie.
Definition: ssl.h:1325
mbedtls_ssl_cookie_check_t mbedtls_ssl_cookie_check
Verify cookie, see mbedtls_ssl_cookie_write_t.
Definition: ssl_cookie.h:102
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
mbedtls_ssl_cookie_write_t mbedtls_ssl_cookie_write
Generate cookie, see mbedtls_ssl_cookie_write_t.
Definition: ssl_cookie.h:97
void mbedtls_ssl_cookie_set_timeout(mbedtls_ssl_cookie_ctx *ctx, unsigned long delay)
Set expiration delay for cookies (Default MBEDTLS_SSL_COOKIE_TIMEOUT)
Definition: ssl_cookie.c:88
void mbedtls_ssl_cookie_free(mbedtls_ssl_cookie_ctx *ctx)
Free cookie context.
Definition: ssl_cookie.c:93
unsigned long timeout
Definition: ssl_cookie.h:58
int mbedtls_ssl_cookie_setup(mbedtls_ssl_cookie_ctx *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng)
Setup cookie context (generate keys)
Definition: ssl_cookie.c:104
Context for the default cookie functions.
Definition: ssl_cookie.h:52