mbed TLS v2.2.0
ssl_cookie.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_SSL_COOKIE_H
24 #define MBEDTLS_SSL_COOKIE_H
25 
26 #include "ssl.h"
27 
28 #if defined(MBEDTLS_THREADING_C)
29 #include "threading.h"
30 #endif
31 
39 #ifndef MBEDTLS_SSL_COOKIE_TIMEOUT
40 #define MBEDTLS_SSL_COOKIE_TIMEOUT 60
41 #endif
42 
43 /* \} name SECTION: Module settings */
44 
45 #ifdef __cplusplus
46 extern "C" {
47 #endif
48 
52 typedef struct
53 {
55 #if !defined(MBEDTLS_HAVE_TIME)
56  unsigned long serial;
57 #endif
58  unsigned long timeout;
61 #if defined(MBEDTLS_THREADING_C)
62  mbedtls_threading_mutex_t mutex;
63 #endif
65 
70 
75  int (*f_rng)(void *, unsigned char *, size_t),
76  void *p_rng );
77 
87 void mbedtls_ssl_cookie_set_timeout( mbedtls_ssl_cookie_ctx *ctx, unsigned long delay );
88 
93 
98 
103 
104 #ifdef __cplusplus
105 }
106 #endif
107 
108 #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:1172
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:1189
Generic message digest context.
Definition: md.h:66
Threading abstraction layer.
SSL/TLS functions.