From dd133d7aca576c361a270c8e6434832535b42ecc Mon Sep 17 00:00:00 2001 From: Jordan Bray Date: Thu, 19 Jun 2025 18:01:47 +0200 Subject: [PATCH] make RNG state thread_local --- src/common/broadwell/randombytes_ctrdrbg_aesni.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/common/broadwell/randombytes_ctrdrbg_aesni.c b/src/common/broadwell/randombytes_ctrdrbg_aesni.c index 3fc67ac..a334fab 100644 --- a/src/common/broadwell/randombytes_ctrdrbg_aesni.c +++ b/src/common/broadwell/randombytes_ctrdrbg_aesni.c @@ -33,6 +33,7 @@ protection within the United States. #include #include +#include #include "ctr_drbg.h" #ifdef ENABLE_CT_TESTING @@ -44,7 +45,7 @@ protection within the United States. #define RNG_BAD_OUTBUF -2 #define RNG_BAD_REQ_LEN -3 -CTR_DRBG_STATE drbg; +thread_local CTR_DRBG_STATE drbg; #ifndef CTRDRBG_TEST_BENCH static