summaryrefslogtreecommitdiffstats
path: root/ssl/ssl_ciph.c
diff options
context:
space:
mode:
authorNils Larsch <nils@openssl.org>2005-08-21 23:06:51 +0000
committerNils Larsch <nils@openssl.org>2005-08-21 23:06:51 +0000
commitcd9911fdf8a3f1afe9661d31868a24a6aef78c96 (patch)
tree4e626b3be6250c8f367f30ea9bd060774b42f748 /ssl/ssl_ciph.c
parent60864221938485cf10734188ebdd76a807fe0491 (diff)
initialize cipher/digest methods table in SSL_library_init() and hence remove the need for a lock
Diffstat (limited to 'ssl/ssl_ciph.c')
-rw-r--r--ssl/ssl_ciph.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/ssl/ssl_ciph.c b/ssl/ssl_ciph.c
index 9493e2d85b..8c2e1c305e 100644
--- a/ssl/ssl_ciph.c
+++ b/ssl/ssl_ciph.c
@@ -165,9 +165,7 @@ static const SSL_CIPHER cipher_aliases[]={
{0,SSL_TXT_HIGH, 0, 0, SSL_HIGH, 0,0,0,0,SSL_STRONG_MASK},
};
-static int init_ciphers=1;
-
-static void load_ciphers(void)
+void ssl_load_ciphers(void)
{
ssl_cipher_methods[SSL_ENC_DES_IDX]=
EVP_get_cipherbyname(SN_des_cbc);
@@ -192,7 +190,6 @@ static void load_ciphers(void)
EVP_get_digestbyname(SN_md5);
ssl_digest_methods[SSL_MD_SHA1_IDX]=
EVP_get_digestbyname(SN_sha1);
- init_ciphers=0;
}
static int sk_comp_cmp(const SSL_COMP * const *a,
@@ -816,13 +813,6 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
if (rule_str == NULL || cipher_list == NULL || cipher_list_by_id == NULL)
return NULL;
- 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
* in algorithms, so we first get the mask of disabled ciphers.