Fix race condition.
authorDr. Stephen Henson <steve@openssl.org>
Mon, 25 Oct 2004 11:15:49 +0000 (11:15 +0000)
committerDr. Stephen Henson <steve@openssl.org>
Mon, 25 Oct 2004 11:15:49 +0000 (11:15 +0000)
ssl/ssl_ciph.c

index f76ba92348fbe0705b77efbb94c26e8bb4debf03..012d05ecea78faf87c20b37d04135cf4d6cac2cb 100644 (file)
@@ -161,7 +161,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]=
@@ -185,6 +184,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;
        }
 
 int ssl_cipher_get_evp(SSL_SESSION *s, const EVP_CIPHER **enc,