Accepting request 560438 from home:elvigia:branches:network
- build.with-openssl-1_1.patch: fix build with openssl 1.1. OBS-URL: https://build.opensuse.org/request/show/560438 OBS-URL: https://build.opensuse.org/package/show/network/elinks?expand=0&rev=9
This commit is contained in:
parent
28bcc67091
commit
ed2dc0e1a3
51
build.with-openssl-1_1.patch
Normal file
51
build.with-openssl-1_1.patch
Normal file
@ -0,0 +1,51 @@
|
||||
Index: elinks-0.12pre6/src/network/ssl/socket.c
|
||||
===================================================================
|
||||
--- elinks-0.12pre6.orig/src/network/ssl/socket.c
|
||||
+++ elinks-0.12pre6/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;
|
||||
+//nothing.. wut was that..
|
||||
#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,
|
||||
Index: elinks-0.12pre6/src/network/ssl/ssl.c
|
||||
===================================================================
|
||||
--- elinks-0.12pre6.orig/src/network/ssl/ssl.c
|
||||
+++ elinks-0.12pre6/src/network/ssl/ssl.c
|
||||
@@ -44,19 +44,13 @@ SSL_CTX *context = NULL;
|
||||
static void
|
||||
init_openssl(struct module *module)
|
||||
{
|
||||
- unsigned 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 */
|
||||
- if (RAND_egd(RAND_file_name(f_randfile, sizeof(f_randfile))) < 0) {
|
||||
- /* Not an EGD, so read and write to it */
|
||||
- if (RAND_load_file(f_randfile, -1))
|
||||
- RAND_write_file(f_randfile);
|
||||
- }
|
||||
+#if OPENSSL_VERSION_NUMBER < 0x10100000L
|
||||
+ SSL_library_init();
|
||||
+#else
|
||||
+ OPENSSL_init_ssl(0, NULL);
|
||||
+#endif
|
||||
|
||||
- SSLeay_add_ssl_algorithms();
|
||||
context = SSL_CTX_new(SSLv23_client_method());
|
||||
SSL_CTX_set_options(context, SSL_OP_ALL);
|
||||
SSL_CTX_set_default_verify_paths(context);
|
@ -1,3 +1,8 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 28 19:36:07 UTC 2017 - crrodriguez@opensuse.org
|
||||
|
||||
- build.with-openssl-1_1.patch: fix build with openssl 1.1.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Tue Jun 14 14:46:59 UTC 2016 - adam.majer@suse.de
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package elinks
|
||||
#
|
||||
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2017 SUSE LINUX GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -34,6 +34,7 @@ Patch0: elinks-0.12_pre5-compilation-fix.patch
|
||||
Patch1: use_lua-5.1.patch
|
||||
# PATCH-FIX-UPSTREAM build-with-ruby-1.9.patch dabbot@gentoo.org -- Support for ruby-1.9 (patch taken from Gentoo)
|
||||
Patch2: build-with-ruby-1.9.patch
|
||||
Patch3: build.with-openssl-1_1.patch
|
||||
%if 0%{?suse_version} > 1140
|
||||
BuildRequires: gc-devel
|
||||
%endif
|
||||
@ -75,7 +76,7 @@ description.
|
||||
%patch0 -p1
|
||||
%patch1
|
||||
%patch2 -p1
|
||||
|
||||
%patch3 -p1
|
||||
# Remove build time references so build-compare can do its work
|
||||
FAKE_BUILDTIME=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%H:%%M')
|
||||
FAKE_BUILDDATE=$(LC_ALL=C date -u -r %{_sourcedir}/%{name}.changes '+%%b %%e %%Y')
|
||||
@ -85,7 +86,6 @@ sed -i "s/__DATE__/\"$FAKE_BUILDDATE\"/" src/vernum.c
|
||||
%build
|
||||
# required for ruby patch
|
||||
sh ./autogen.sh
|
||||
export CFLAGS="%{optflags} -fstack-protector"
|
||||
%configure \
|
||||
--sysconfdir=%{_sysconfdir}/elinks \
|
||||
--enable-bittorrent \
|
||||
|
Loading…
x
Reference in New Issue
Block a user