Mbed TLS v4.1.1
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#include "mbedtls/private_access.h"
13
14#include "mbedtls/build_info.h"
15
16#include "mbedtls/ssl.h"
17
18
26#ifndef MBEDTLS_SSL_COOKIE_TIMEOUT
27#define MBEDTLS_SSL_COOKIE_TIMEOUT 60
28#endif
29
31
32#ifdef __cplusplus
33extern "C" {
34#endif
35
39typedef struct mbedtls_ssl_cookie_ctx {
40 mbedtls_svc_key_id_t MBEDTLS_PRIVATE(psa_hmac_key);
41 psa_algorithm_t MBEDTLS_PRIVATE(psa_hmac_alg);
42#if !defined(MBEDTLS_HAVE_TIME)
43 unsigned long MBEDTLS_PRIVATE(serial);
44#endif
45 unsigned long MBEDTLS_PRIVATE(timeout);
47
49
54
59
70
75
80
85
86#ifdef __cplusplus
87}
88#endif
89
90#endif /* ssl_cookie.h */
uint32_t psa_algorithm_t
Encoding of a cryptographic algorithm.
psa_key_id_t mbedtls_svc_key_id_t
Build-time configuration info.
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:2897
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:2914