diff options
author | Hugo Landau <hlandau@openssl.org> | 2024-02-08 10:27:56 +0000 |
---|---|---|
committer | Tomas Mraz <tomas@openssl.org> | 2024-02-09 14:11:51 +0100 |
commit | 7b4fc8eb72cf5b2de7f2b22838449d28cfd9f0c7 (patch) | |
tree | 8a36500cb04c28a27c7a6384b7a07f6a25856080 /include/internal/thread_arch.h | |
parent | 351cfa7ef26061fe7eb246520289258a692c071a (diff) |
THREADING: Make CRYPTO_MUTEX and CRYPTO_CONDVAR typesafe
There was really no need for this to be void and it made bugs very easy
to introduce accidentally, especially given that the free functions
needed to be passed a pointer to the pointer.
Also fix some bugs in the QUIC code detected immediately by this change.
Reviewed-by: Matt Caswell <matt@openssl.org>
Reviewed-by: Tomas Mraz <tomas@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/23519)
(cherry picked from commit 62cb7c810e882895a71ba2cc479f482df0aa8e32)
Diffstat (limited to 'include/internal/thread_arch.h')
-rw-r--r-- | include/internal/thread_arch.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/include/internal/thread_arch.h b/include/internal/thread_arch.h index 1bfc0ebb3d..0994433e7d 100644 --- a/include/internal/thread_arch.h +++ b/include/internal/thread_arch.h @@ -37,8 +37,8 @@ # include <openssl/crypto.h> -typedef void CRYPTO_MUTEX; -typedef void CRYPTO_CONDVAR; +typedef struct crypto_mutex_st CRYPTO_MUTEX; +typedef struct crypto_condvar_st CRYPTO_CONDVAR; CRYPTO_MUTEX *ossl_crypto_mutex_new(void); void ossl_crypto_mutex_lock(CRYPTO_MUTEX *mutex); |