Mbed TLS v2.28.9
Loading...
Searching...
No Matches
ssl_cookie.h
Go to the documentation of this file.
1
6/*
7 * Copyright The Mbed TLS Contributors
8 * SPDX-License-Identifier: Apache-2.0 OR GPL-2.0-or-later
9 */
10#ifndef MBEDTLS_SSL_COOKIE_H
11#define MBEDTLS_SSL_COOKIE_H
12
13#if !defined(MBEDTLS_CONFIG_FILE)
14#include "mbedtls/config.h"
15#else
16#include MBEDTLS_CONFIG_FILE
17#endif
18
19#include "mbedtls/ssl.h"
20
21#if defined(MBEDTLS_THREADING_C)
22#include "mbedtls/threading.h"
23#endif
24
32#ifndef MBEDTLS_SSL_COOKIE_TIMEOUT
33#define MBEDTLS_SSL_COOKIE_TIMEOUT 60
34#endif
35
38#ifdef __cplusplus
39extern "C" {
40#endif
41
45typedef struct mbedtls_ssl_cookie_ctx {
47#if !defined(MBEDTLS_HAVE_TIME)
48 unsigned long serial;
49#endif
50 unsigned long timeout;
53#if defined(MBEDTLS_THREADING_C)
55#endif
57
62
67 int (*f_rng)(void *, unsigned char *, size_t),
68 void *p_rng);
69
80
85
90
95
96#ifdef __cplusplus
97}
98#endif
99
100#endif /* ssl_cookie.h */
Configuration options (set of defines)
SSL/TLS functions.
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:2264
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:2281
Threading abstraction layer.