pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/www/elinks elinks: Support OpenSSL 1.1. Based on the F...



details:   https://anonhg.NetBSD.org/pkgsrc/rev/ef13d48e3a25
branches:  trunk
changeset: 335995:ef13d48e3a25
user:      nia <nia%pkgsrc.org@localhost>
date:      Thu Jul 04 12:15:04 2019 +0000

description:
elinks: Support OpenSSL 1.1. Based on the FreeBSD Ports patches.

While here, define LICENSE.

Bump PKGREVISION.

diffstat:

 www/elinks/Makefile                               |   3 +-
 www/elinks/distinfo                               |   4 ++-
 www/elinks/patches/patch-src_network_ssl_socket.c |  26 +++++++++++++++++++++
 www/elinks/patches/patch-src_network_ssl_ssl.c    |  28 +++++++++++++++++++++++
 4 files changed, 59 insertions(+), 2 deletions(-)

diffs (94 lines):

diff -r 116b90ec6993 -r ef13d48e3a25 www/elinks/Makefile
--- a/www/elinks/Makefile       Thu Jul 04 12:09:35 2019 +0000
+++ b/www/elinks/Makefile       Thu Jul 04 12:15:04 2019 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.63 2018/04/17 22:29:52 wiz Exp $
+# $NetBSD: Makefile,v 1.64 2019/07/04 12:15:04 nia Exp $
 
 DISTNAME=              elinks-0.12pre6
 PKGNAME=               ${DISTNAME:S/pre/rc/}
@@ -11,6 +11,7 @@
 MAINTAINER=            pkgsrc-users%NetBSD.org@localhost
 HOMEPAGE=              http://elinks.or.cz/
 COMMENT=               Extended/Enhanced Links
+LICENSE=               gnu-gpl-v2
 
 GNU_CONFIGURE=         yes
 USE_PKGLOCALEDIR=      yes
diff -r 116b90ec6993 -r ef13d48e3a25 www/elinks/distinfo
--- a/www/elinks/distinfo       Thu Jul 04 12:09:35 2019 +0000
+++ b/www/elinks/distinfo       Thu Jul 04 12:15:04 2019 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.29 2015/11/04 02:46:52 agc Exp $
+$NetBSD: distinfo,v 1.30 2019/07/04 12:15:04 nia Exp $
 
 SHA1 (elinks-0.12pre6.tar.bz2) = 3517795e8a390cb36ca249a5be6514b9784520a5
 RMD160 (elinks-0.12pre6.tar.bz2) = 99d92dde61ed9c626f10d3d431ed4d325b2e33f6
@@ -11,3 +11,5 @@
 SHA1 (patch-ae) = a46c419ec3d96825958903459708b8b131862053
 SHA1 (patch-ag) = c31bede62a6baa1d43ab1dff639f9d7265d2bece
 SHA1 (patch-ah) = 25357fd0b0aa08f7ca55f3f8c262d2d1a4874710
+SHA1 (patch-src_network_ssl_socket.c) = 8929de875b61dc0c343764f01b9f587b0f3760f9
+SHA1 (patch-src_network_ssl_ssl.c) = e74b65f4b866ec0ce1ec290d012cb17cf076fbb1
diff -r 116b90ec6993 -r ef13d48e3a25 www/elinks/patches/patch-src_network_ssl_socket.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/elinks/patches/patch-src_network_ssl_socket.c Thu Jul 04 12:15:04 2019 +0000
@@ -0,0 +1,26 @@
+$NetBSD: patch-src_network_ssl_socket.c,v 1.1 2019/07/04 12:15:04 nia Exp $
+
+Support OpenSSL 1.1.
+
+Derived from FreeBSD Ports.
+
+--- src/network/ssl/socket.c.orig      2012-10-28 12:57:15.000000000 +0000
++++ src/network/ssl/socket.c
+@@ -67,7 +67,7 @@ static void
+ ssl_set_no_tls(struct socket *socket)
+ {
+ #ifdef CONFIG_OPENSSL
+-      ((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1;
++      SSL_set_options((ssl_t *) socket->ssl, SSL_OP_NO_TLSv1);
+ #elif defined(CONFIG_GNUTLS)
+       {
+               /* GnuTLS does not support SSLv2 because it is "insecure".
+@@ -145,7 +145,7 @@ ssl_connect(struct socket *socket)
+               }
+ 
+               if (client_cert) {
+-                      SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx;
++                      SSL_CTX *ctx = SSL_get_SSL_CTX(socket->ssl);
+ 
+                       SSL_CTX_use_certificate_chain_file(ctx, client_cert);
+                       SSL_CTX_use_PrivateKey_file(ctx, client_cert,
diff -r 116b90ec6993 -r ef13d48e3a25 www/elinks/patches/patch-src_network_ssl_ssl.c
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/www/elinks/patches/patch-src_network_ssl_ssl.c    Thu Jul 04 12:15:04 2019 +0000
@@ -0,0 +1,28 @@
+$NetBSD: patch-src_network_ssl_ssl.c,v 1.1 2019/07/04 12:15:04 nia Exp $
+
+Build on newer OpenSSL without RAND_egd.
+
+Derived from upstream:
+
+https://repo.or.cz/elinks.git/blobdiff/6eba447e8ae12cacac3b479c7148d189bea3e8ea..f4a58ba3b574a478fd5954ba2c5b29e8b809ff9b:/src/network/ssl/ssl.c
+
+--- src/network/ssl/ssl.c.orig 2012-10-28 12:57:15.000000000 +0000
++++ src/network/ssl/ssl.c
+@@ -50,11 +50,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));
++#ifndef OPENSSL_NO_EGD
++      if (RAND_egd(f_randfile) < 0) {
++#endif
+               /* Not an EGD, so read and write to it */
+               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());



Home | Main Index | Thread Index | Old Index