1
0
mirror of https://github.com/Mbed-TLS/mbedtls.git synced 2025-07-29 11:41:15 +03:00

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