From 50d1c3fd85528bca8f0564fa9d4d9f50cf8055aa Mon Sep 17 00:00:00 2001 From: Richard Levitte Date: Tue, 16 Jul 2002 06:51:45 +0000 Subject: [PATCH] Set up the engine before doing anything random-related, since engine randomness is only used for seeding and doing it in the wrong order will mean seeding is done before the engine randomness is hooked in. Notified by Frederic DONNAT --- apps/s_client.c | 10 +++++----- apps/s_server.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/apps/s_client.c b/apps/s_client.c index 9c0dbc2bf6..658a79d390 100644 --- a/apps/s_client.c +++ b/apps/s_client.c @@ -433,6 +433,11 @@ bad: goto end; } + OpenSSL_add_ssl_algorithms(); + SSL_load_error_strings(); + + e = setup_engine(bio_err, engine_id, 1); + if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL && !RAND_status()) { @@ -455,11 +460,6 @@ bad: } } - OpenSSL_add_ssl_algorithms(); - SSL_load_error_strings(); - - e = setup_engine(bio_err, engine_id, 1); - ctx=SSL_CTX_new(meth); if (ctx == NULL) { diff --git a/apps/s_server.c b/apps/s_server.c index 78d90fad55..497abf44ef 100644 --- a/apps/s_server.c +++ b/apps/s_server.c @@ -683,6 +683,11 @@ bad: goto end; } + SSL_load_error_strings(); + OpenSSL_add_ssl_algorithms(); + + e = setup_engine(bio_err, engine_id, 1); + if (!app_RAND_load_file(NULL, bio_err, 1) && inrand == NULL && !RAND_status()) { @@ -715,11 +720,6 @@ bad: s_dkey_file=NULL; } - SSL_load_error_strings(); - OpenSSL_add_ssl_algorithms(); - - e = setup_engine(bio_err, engine_id, 1); - ctx=SSL_CTX_new(meth); if (ctx == NULL) { -- 2.25.1