RetroArch
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 */
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
SSL/TLS functions.
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
Definition: md.h:66
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