From: Pauli Date: Tue, 18 May 2021 07:54:43 +0000 (+1000) Subject: core: condition out more in FIPS builds X-Git-Tag: openssl-3.0.0-beta1~421 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ec91f1ae199aaef7d4edd00741e0ccc5630871b8;p=thirdparty%2Fopenssl.git core: condition out more in FIPS builds Reviewed-by: Matt Caswell (Merged from https://github.com/openssl/openssl/pull/15278) --- diff --git a/crypto/initthread.c b/crypto/initthread.c index fec32130475..73f55c5cb8e 100644 --- a/crypto/initthread.c +++ b/crypto/initthread.c @@ -33,7 +33,9 @@ extern OSSL_FUNC_core_thread_start_fn *c_thread_start; typedef struct thread_event_handler_st THREAD_EVENT_HANDLER; struct thread_event_handler_st { +#ifndef FIPS_MODULE const void *index; +#endif void *arg; OSSL_thread_stop_handler_fn handfn; THREAD_EVENT_HANDLER *next; @@ -376,7 +378,9 @@ int ossl_init_thread_start(const void *index, void *arg, hand->handfn = handfn; hand->arg = arg; +#ifndef FIPS_MODULE hand->index = index; +#endif hand->next = *hands; *hands = hand; diff --git a/include/internal/cryptlib.h b/include/internal/cryptlib.h index 3499025fa11..1291299b6e5 100644 --- a/include/internal/cryptlib.h +++ b/include/internal/cryptlib.h @@ -155,7 +155,9 @@ typedef struct ossl_ex_data_global_st { # define OSSL_LIB_CTX_DRBG_INDEX 5 # define OSSL_LIB_CTX_DRBG_NONCE_INDEX 6 # define OSSL_LIB_CTX_RAND_CRNGT_INDEX 7 -# define OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX 8 +# ifdef FIPS_MODULE +# define OSSL_LIB_CTX_THREAD_EVENT_HANDLER_INDEX 8 +# endif # define OSSL_LIB_CTX_FIPS_PROV_INDEX 9 # define OSSL_LIB_CTX_ENCODER_STORE_INDEX 10 # define OSSL_LIB_CTX_DECODER_STORE_INDEX 11