From: Eugene Syromiatnikov Date: Mon, 7 Jul 2025 13:15:44 +0000 (+0200) Subject: crypto/threads_lock_contention: condition file suffix on FIPS_MODULE and not fopen... X-Git-Tag: openssl-3.6.0-alpha1~257 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=1178184e96b4748f552a7904682ae1b7804e3edc;p=thirdparty%2Fopenssl.git crypto/threads_lock_contention: condition file suffix on FIPS_MODULE and not fopen() call Signed-off-by: Eugene Syromiatnikov Reviewed-by: Neil Horman Reviewed-by: Saša Nedvědický (Merged from https://github.com/openssl/openssl/pull/27983) --- diff --git a/crypto/threads_pthread.c b/crypto/threads_pthread.c index ed04c54359a..e419f210832 100644 --- a/crypto/threads_pthread.c +++ b/crypto/threads_pthread.c @@ -637,13 +637,14 @@ struct stack_traces { struct stack_info stacks[STACKS_COUNT]; }; -static void init_contention_fp_once(void) -{ # ifdef FIPS_MODULE - contention_fp = fopen("lock-contention-log-fips.txt", "w"); +# define FIPS_SFX "-fips" # else - contention_fp = fopen("lock-contention-log.txt", "w"); +# define FIPS_SFX "" # endif +static void init_contention_fp_once(void) +{ + contention_fp = fopen("lock-contention-log" FIPS_SFX ".txt", "w"); if (contention_fp == NULL) fprintf(stderr, "Contention log file could not be opened, log will not be recorded\n");