mirror of
https://git.suyu.dev/suyu/mbedtls.git
synced 2026-03-09 09:56:29 +00:00
Make ssl ticket functions thread-safe
This commit is contained in:
@@ -27,11 +27,14 @@
|
||||
#include "ssl.h"
|
||||
#include "aes.h"
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "threading.h"
|
||||
#endif
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
|
||||
/**
|
||||
* \brief Context for session ticket handling functions
|
||||
*/
|
||||
@@ -47,6 +50,10 @@ typedef struct
|
||||
/** Callback for getting (pseudo-)random numbers */
|
||||
int (*f_rng)(void *, unsigned char *, size_t);
|
||||
void *p_rng; /*!< context for the RNG function */
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
mbedtls_threading_mutex_t mutex;
|
||||
#endif
|
||||
}
|
||||
mbedtls_ssl_ticket_context;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user