Make ssl_cookie.c thread-safe

This commit is contained in:
Manuel Pégourié-Gonnard 2015-05-28 15:48:09 +02:00
parent b48ef9cce9
commit 2a84dfd747
2 changed files with 49 additions and 3 deletions

View file

@ -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;
/**