Fix race condition when SSL ciphers are initialized.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 25 Oct 2004 11:14:16 +0000 (11:14 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 25 Oct 2004 11:14:16 +0000 (11:14 +0000)
ssl/ssl_ciph.c

index c31927706a52ac6f9a2135fc2c8dfecdea266e1c..da231de213e4cfa1d9ef2af1e72ff93fd7f37bbd 100644 (file)
@@ -169,7 +169,6 @@ static int init_ciphers=1;
 
 static void load_ciphers(void)
        {
-       init_ciphers=0;
        ssl_cipher_methods[SSL_ENC_DES_IDX]= 
                EVP_get_cipherbyname(SN_des_cbc);
        ssl_cipher_methods[SSL_ENC_3DES_IDX]=
@@ -193,6 +192,7 @@ 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,