aboutsummaryrefslogtreecommitdiffstats
path: root/main/elinks/ssl-Make-RAND_egd-optional.patch
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2016-10-04 18:56:13 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2016-10-10 12:04:09 +0000
commit06a353f2c69b2c2cbc729c2901f7cc652daa89f6 (patch)
treefc2c03b4413d0969674618f0fddde3020b0cfe31 /main/elinks/ssl-Make-RAND_egd-optional.patch
parent8511daaf821c2fbb4691a7a4ace5d9037d07755c (diff)
downloadaports-06a353f2c69b2c2cbc729c2901f7cc652daa89f6.tar.bz2
aports-06a353f2c69b2c2cbc729c2901f7cc652daa89f6.tar.xz
main/elinks: rebuild against libressl
Diffstat (limited to 'main/elinks/ssl-Make-RAND_egd-optional.patch')
-rw-r--r--main/elinks/ssl-Make-RAND_egd-optional.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/main/elinks/ssl-Make-RAND_egd-optional.patch b/main/elinks/ssl-Make-RAND_egd-optional.patch
new file mode 100644
index 0000000000..aa56928fe7
--- /dev/null
+++ b/main/elinks/ssl-Make-RAND_egd-optional.patch
@@ -0,0 +1,35 @@
+From 4357901b04ed582df55873532c6c22e671512af3 Mon Sep 17 00:00:00 2001
+From: Kylie McClain <somasis@exherbo.org>
+Date: Tue, 29 Dec 2015 15:11:52 -0500
+Subject: [PATCH] ssl: Make RAND_egd optional
+
+Fixes compilation with LibreSSL.
+---
+ src/network/ssl/ssl.c | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+diff --git a/src/network/ssl/ssl.c b/src/network/ssl/ssl.c
+index 693ac37..5ed5754 100644
+--- a/src/network/ssl/ssl.c
++++ b/src/network/ssl/ssl.c
+@@ -84,11 +84,16 @@ 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));
++#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());
+--
+2.6.4
+