From: Richard Levitte Date: Mon, 16 Dec 2002 06:06:06 +0000 (+0000) Subject: Protect loading routines with a lock. X-Git-Tag: OpenSSL_0_9_7-beta6~5 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=1f1a32541fc412b991b457d6548912e7bcac5d59;p=oweals%2Fopenssl.git Protect loading routines with a lock. PR: 373 --- 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