mbed TLS v2.6.0
ssl_cookie.h
Go to the documentation of this file.
1 
25 #ifndef MBEDTLS_SSL_COOKIE_H
26 #define MBEDTLS_SSL_COOKIE_H
27 
28 #include "ssl.h"
29 
30 #if defined(MBEDTLS_THREADING_C)
31 #include "threading.h"
32 #endif
33 
41 #ifndef MBEDTLS_SSL_COOKIE_TIMEOUT
42 #define MBEDTLS_SSL_COOKIE_TIMEOUT 60
43 #endif
44 
45 /* \} name SECTION: Module settings */
46 
47 #ifdef __cplusplus
48 extern "C" {
49 #endif
50 
54 typedef struct
55 {
57 #if !defined(MBEDTLS_HAVE_TIME)
58  unsigned long serial;
59 #endif
60  unsigned long timeout;
63 #if defined(MBEDTLS_THREADING_C)
64  mbedtls_threading_mutex_t mutex;
65 #endif
67 
72 
77  int (*f_rng)(void *, unsigned char *, size_t),
78  void *p_rng );
79 
89 void mbedtls_ssl_cookie_set_timeout( mbedtls_ssl_cookie_ctx *ctx, unsigned long delay );
90 
95 
100 
105 
106 #ifdef __cplusplus
107 }
108 #endif
109 
110 #endif /* ssl_cookie.h */
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:1310
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:1327
Generic message digest context.
Definition: md.h:68
Threading abstraction layer.
SSL/TLS functions.