static void load_builtin_compressions(void)
{
+ if (ssl_comp_methods != NULL)
+ return;
+
+ CRYPTO_w_lock(CRYPTO_LOCK_SSL);
if (ssl_comp_methods == NULL)
{
SSL_COMP *comp = NULL;
}
MemCheck_on();
}
+ CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
}
int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,
*/
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