FreeBSD Bugzilla – Attachment 200970 Details for
Bug 234808
www/elinks: Fix ssl initialization on newer openssl/libressl without EGD
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Allow RAND_file_name() to init. f_randfile
0001-Fix-www-elinks-SSL-when-egd-is-missing.patch (text/plain), 2.14 KB, created by
Derek Schrock
on 2019-01-10 00:28:10 UTC
(
hide
)
Description:
Allow RAND_file_name() to init. f_randfile
Filename:
MIME Type:
Creator:
Derek Schrock
Created:
2019-01-10 00:28:10 UTC
Size:
2.14 KB
patch
obsolete
>From 7c0af916750c3c14c7fadd185bb31950f27a9286 Mon Sep 17 00:00:00 2001 >From: Derek Schrock <dereks@lifeofadishwasher.com> >Date: Wed, 9 Jan 2019 18:18:56 -0500 >Subject: [PATCH] Fix www/elinks SSL when egd is missing > >For newer openssl/libressl when RAND_egd is disabled >patch-src_network_ssl_ssl.c removed RAND_egd() and the RAND_file_name() >leaving f_randfile uninitialized resulting odd files in $HOME/ when >elinks initialized ssl. > > $ ls -ld $'\x01' > -rw------- 1 dereks wheel 1024 Jan 9 18:24 ? > >The file should be ~/.rnd set but RAND_file_name() > >Fixed upstram is but this commit: >https://repo.or.cz/elinks.git/blobdiff/6eba447e8ae12cacac3b479c7148d189bea3e8ea..f4a58ba3b574a478fd5954ba2c5b29e8b809ff9b:/src/network/ssl/ssl.c >--- > www/elinks/files/patch-src_network_ssl_ssl.c | 17 ++++++++++++----- > 1 file changed, 12 insertions(+), 5 deletions(-) > >diff --git a/www/elinks/files/patch-src_network_ssl_ssl.c b/www/elinks/files/patch-src_network_ssl_ssl.c >index e1497ae2e927..996c7f867188 100644 >--- a/www/elinks/files/patch-src_network_ssl_ssl.c >+++ b/www/elinks/files/patch-src_network_ssl_ssl.c >@@ -1,14 +1,21 @@ >---- src/network/ssl/ssl.c.orig 2009-08-22 13:15:08.000000000 +0200 >-+++ src/network/ssl/ssl.c 2015-03-21 12:41:15.886709287 +0100 >-@@ -49,7 +49,10 @@ init_openssl(struct module *module) >+--- src/network/ssl/ssl.c.orig 2019-01-09 23:04:06 UTC >++++ src/network/ssl/ssl.c >+@@ -49,11 +49,17 @@ init_openssl(struct module *module) > * 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 */ > - if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) { >++ RAND_file_name(f_randfile, sizeof(f_randfile)); > +#ifndef OPENSSL_NO_EGD >-+ if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) >-+#endif >++ 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); >++#ifndef OPENSSL_NO_EGD >+ } >++#endif >+ >+ SSLeay_add_ssl_algorithms(); >+ context = SSL_CTX_new(SSLv23_client_method()); >-- >2.20.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 234808
:
200969
| 200970