Submitted by: Peter Edwards <peter.edwards@vordel.com>
Approved by: steve@openssl.org

Avoid race condition by sorting cipher list straight away.
This commit is contained in:
Dr. Stephen Henson
2009-04-07 12:10:12 +00:00
parent a78ded0b61
commit 3fdc2c906d
2 changed files with 3 additions and 2 deletions

View File

@@ -106,9 +106,9 @@ int MAIN(int argc, char **argv)
char *inrand=NULL;
BIO *out=NULL;
BIGNUM *bn = BN_new();
RSA *rsa = RSA_new();
RSA *rsa = NULL;
if(!bn || !rsa) goto err;
if(!bn) goto err;
apps_startup();
BN_GENCB_set(&cb, genrsa_cb, bio_err);

View File

@@ -1091,6 +1091,7 @@ STACK_OF(SSL_CIPHER) *ssl_create_cipher_list(const SSL_METHOD *ssl_method,
*cipher_list_by_id = tmp_cipher_list;
(void)sk_SSL_CIPHER_set_cmp_func(*cipher_list_by_id,ssl_cipher_ptr_id_cmp);
sk_SSL_CIPHER_sort(*cipher_list_by_id);
return(cipherstack);
}