From 06a4ef9dd099b011346fccd2a1cc96711cf129f3 Mon Sep 17 00:00:00 2001 From: Kamil Dudka Date: Mon, 11 Apr 2022 09:14:52 +0200 Subject: [PATCH] Resolves: #90663 - prevent crash when HOME is unset elinks-0.11.0-ssl-noegd.patch rebased on 0.15.0 --- src/network/ssl/ssl.c | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/src/network/ssl/ssl.c b/src/network/ssl/ssl.c index dbc506c..c09daa2 100644 --- a/src/network/ssl/ssl.c +++ b/src/network/ssl/ssl.c @@ -80,23 +80,6 @@ socket_SSL_ex_data_dup(CRYPTO_EX_DATA *to, const CRYPTO_EX_DATA *from, static void init_openssl(struct module *module) { - char f_randfile[PATH_MAX]; - - /* In a nutshell, on OS's without a /dev/urandom, the OpenSSL library - * cannot initialize the PRNG and so every attempt to use SSL fails. - * It's actually an OpenSSL FAQ, and according to them, it's up to the - * application coders to seed the RNG. -- William Yodlowsky */ - RAND_file_name(f_randfile, sizeof(f_randfile)); -#ifdef HAVE_RAND_EGD - if (RAND_egd(f_randfile) < 0) { - /* Not an EGD, so read and write to it */ -#endif - if (RAND_load_file(f_randfile, -1)) - RAND_write_file(f_randfile); -#ifdef HAVE_RAND_EGD - } -#endif - SSLeay_add_ssl_algorithms(); context = SSL_CTX_new(SSLv23_client_method()); SSL_CTX_set_options(context, SSL_OP_ALL); -- 2.34.1