RetroArch
ssl_ticket.h
Go to the documentation of this file.
1 
23 #ifndef MBEDTLS_SSL_TICKET_H
24 #define MBEDTLS_SSL_TICKET_H
25 
26 /*
27  * This implementation of the session ticket callbacks includes key
28  * management, rotating the keys periodically in order to preserve forward
29  * secrecy, when MBEDTLS_HAVE_TIME is defined.
30  */
31 
32 #include "ssl.h"
33 #include "cipher.h"
34 
35 #if defined(MBEDTLS_THREADING_C)
36 #include "threading.h"
37 #endif
38 
39 #ifdef __cplusplus
40 extern "C" {
41 #endif
42 
46 typedef struct
47 {
48  unsigned char name[4];
51 }
53 
57 typedef struct
58 {
60  unsigned char active;
65  int (*f_rng)(void *, unsigned char *, size_t);
66  void *p_rng;
68 #if defined(MBEDTLS_THREADING_C)
69  mbedtls_threading_mutex_t mutex;
70 #endif
71 }
73 
82 
106  int (*f_rng)(void *, unsigned char *, size_t), void *p_rng,
107  mbedtls_cipher_type_t cipher,
108  uint32_t lifetime );
109 
116 
123 
130 
131 #ifdef __cplusplus
132 }
133 #endif
134 
135 #endif /* ssl_ticket.h */
GLuint const GLchar * name
Definition: glext.h:6671
int mbedtls_ssl_ticket_write_t(void *p_ticket, const mbedtls_ssl_session *session, unsigned char *start, const unsigned char *end, size_t *tlen, uint32_t *lifetime)
Callback type: generate and write session ticket.
Definition: ssl.h:1193
Threading abstraction layer.
mbedtls_ssl_ticket_parse_t mbedtls_ssl_ticket_parse
Implementation of the ticket parse callback.
Definition: ssl_ticket.h:122
static sys_sem mutex
Definition: memp.c:120
int mbedtls_ssl_ticket_parse_t(void *p_ticket, mbedtls_ssl_session *session, unsigned char *buf, size_t len)
Callback type: parse and load session ticket.
Definition: ssl.h:1252
void * p_rng
Definition: ssl_ticket.h:66
mbedtls_ssl_ticket_write_t mbedtls_ssl_ticket_write
Implementation of the ticket write callback.
Definition: ssl_ticket.h:115
AVFormatContext * ctx
Definition: record_ffmpeg.c:247
SSL/TLS functions.
uint32_t ticket_lifetime
Definition: ssl_ticket.h:62
uint32_t generation_time
Definition: ssl_ticket.h:49
Generic cipher wrapper.
Context for session ticket handling functions.
Definition: ssl_ticket.h:57
unsigned char active
Definition: ssl_ticket.h:60
void mbedtls_ssl_ticket_free(mbedtls_ssl_ticket_context *ctx)
Free a context's content and zeroize it.
Definition: ssl_ticket.c:474
Definition: cipher.h:216
int mbedtls_ssl_ticket_setup(mbedtls_ssl_ticket_context *ctx, int(*f_rng)(void *, unsigned char *, size_t), void *p_rng, mbedtls_cipher_type_t cipher, uint32_t lifetime)
Prepare context to be actually used.
Definition: ssl_ticket.c:119
void mbedtls_ssl_ticket_init(mbedtls_ssl_ticket_context *ctx)
Initialize a ticket context. (Just make it ready for mbedtls_ssl_ticket_setup() or mbedtls_ssl_ticket...
Definition: ssl_ticket.c:47
Information for session ticket protection.
Definition: ssl_ticket.h:46
mbedtls_cipher_context_t ctx
Definition: ssl_ticket.h:50
unsigned int uint32_t
Definition: stdint.h:126
mbedtls_cipher_type_t
Definition: cipher.h:77