Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Feb 2019 06:45:57 +0000 (UTC)
From:      Kurt Jaeger <pi@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r494026 - head/www/elinks/files
Message-ID:  <201902270645.x1R6jv9f071892@repo.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: pi
Date: Wed Feb 27 06:45:57 2019
New Revision: 494026
URL: https://svnweb.freebsd.org/changeset/ports/494026

Log:
  www/elinks: Fix ssl initialization on newer openssl/libressl without EGD
  
  PR:		234808
  Submitted by:	Derek Schrock <dereks@lifeofadishwasher.com>
  Approved by:	beat (maintainer timeout)
  Obtained from:	https://repo.or.cz/elinks.git/blobdiff/6eba447e8ae12cacac3b479c7148d189bea3e8ea..f4a58ba3b574a478fd5954ba2c5b29e8b809ff9b:/src/network/ssl/ssl.c
  MFH:		2019Q1

Modified:
  head/www/elinks/files/patch-src_network_ssl_ssl.c

Modified: head/www/elinks/files/patch-src_network_ssl_ssl.c
==============================================================================
--- head/www/elinks/files/patch-src_network_ssl_ssl.c	Wed Feb 27 06:38:46 2019	(r494025)
+++ head/www/elinks/files/patch-src_network_ssl_ssl.c	Wed Feb 27 06:45:57 2019	(r494026)
@@ -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());



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201902270645.x1R6jv9f071892>