From 1f1a32541fc412b991b457d6548912e7bcac5d59 Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Mon, 16 Dec 2002 06:06:06 +0000 Subject: [PATCH] Protect loading routines with a lock. PR: 373 --- ssl/ssl_ciph.c | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c index 37f58886a6..c72be89e9a 100644 --- a/ssl/ssl_ciph.c +++ b/ssl/ssl_ciph.c @@ -751,7 +751,12 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method, */ if (rule_str == NULL) return(NULL); - if (init_ciphers) load_ciphers(); + if (init_ciphers) + { + CRYPTO_w_lock(CRYPTO_LOCK_SSL); + if (init_ciphers) load_ciphers(); + CRYPTO_w_unlock(CRYPTO_LOCK_SSL); + } /* * To reduce the work to do we only want to process the compiled -- 2.25.1