Make ssl_cookie.c thread-safe
This commit is contained in:
parent
b48ef9cce9
commit
2a84dfd747
2 changed files with 49 additions and 3 deletions
|
@ -26,6 +26,10 @@
|
|||
|
||||
#include "ssl.h"
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
#include "threading.h"
|
||||
#endif
|
||||
|
||||
/**
|
||||
* \name SECTION: Module settings
|
||||
*
|
||||
|
@ -55,6 +59,9 @@ typedef struct
|
|||
unsigned long timeout; /*!< timeout delay, in seconds if HAVE_TIME,
|
||||
or in number of tickets issued */
|
||||
|
||||
#if defined(MBEDTLS_THREADING_C)
|
||||
mbedtls_threading_mutex_t mutex;
|
||||
#endif
|
||||
} mbedtls_ssl_cookie_ctx;
|
||||
|
||||
/**
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue