commit: 9f93ee632f0a851deddaa347bc933278a48f7f8d Author: Felix Janda <felix.janda <AT> posteo <DOT> de> AuthorDate: Sat Oct 14 13:43:32 2017 +0000 Commit: Patrice Clement <monsieurp <AT> gentoo <DOT> org> CommitDate: Sun Oct 22 16:55:09 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=9f93ee63
www-client/elinks-0.12_pre6-r2: fix compilation with libressl. Closes: https://bugs.gentoo.org/584766 Closes: https://bugs.gentoo.org/609006 www-client/elinks/elinks-0.12_pre6-r2.ebuild | 2 ++ .../elinks/files/elinks-0.12_pre5-libressl.patch | 29 ++++++++++++++++++++++ .../elinks/files/elinks-0.12_pre5-rand-egd.patch | 20 +++++++++++++++ 3 files changed, 51 insertions(+) diff --git a/www-client/elinks/elinks-0.12_pre6-r2.ebuild b/www-client/elinks/elinks-0.12_pre6-r2.ebuild index ed3f69831bd..e9e8625888a 100644 --- a/www-client/elinks/elinks-0.12_pre6-r2.ebuild +++ b/www-client/elinks/elinks-0.12_pre6-r2.ebuild @@ -56,6 +56,8 @@ src_prepare() { epatch "${FILESDIR}"/${PN}-9999-parallel-make.patch epatch "${FILESDIR}"/${PN}-0.12_pre5-compilation-fix.patch + epatch "${FILESDIR}"/${PN}-0.12_pre5-libressl.patch + epatch "${FILESDIR}"/${PN}-0.12_pre5-rand-egd.patch if use javascript ; then if has_version ">=dev-lang/spidermonkey-1.8"; then diff --git a/www-client/elinks/files/elinks-0.12_pre5-libressl.patch b/www-client/elinks/files/elinks-0.12_pre5-libressl.patch new file mode 100644 index 00000000000..d41ab689e9f --- /dev/null +++ b/www-client/elinks/files/elinks-0.12_pre5-libressl.patch @@ -0,0 +1,29 @@ +Adapted from upstream +commit 54ebe365b752f8969a67279d0d29552ab638e025 +Author: Witold Filipczyk <wite...@poczta.onet.pl> +Date: Mon Mar 6 17:39:36 2017 +0100 + + Compilation fix for OpenSSL-1.1 + +--- a/src/network/ssl/socket.c ++++ b/src/network/ssl/socket.c +@@ -67,7 +67,9 @@ + ssl_set_no_tls(struct socket *socket) + { + #ifdef CONFIG_OPENSSL +- ((ssl_t *) socket->ssl)->options |= SSL_OP_NO_TLSv1; ++#ifdef SSL_OP_NO_TLSv1 ++ SSL_set_options((ssl_t *)socket->ssl, SSL_OP_NO_TLSv1); ++#endif + #elif defined(CONFIG_GNUTLS) + { + /* GnuTLS does not support SSLv2 because it is "insecure". +@@ -145,7 +147,7 @@ + } + + if (client_cert) { +- SSL_CTX *ctx = ((SSL *) socket->ssl)->ctx; ++ SSL_CTX *ctx = SSL_get_SSL_CTX((SSL *) socket->ssl); + + SSL_CTX_use_certificate_chain_file(ctx, client_cert); + SSL_CTX_use_PrivateKey_file(ctx, client_cert, diff --git a/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch b/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch new file mode 100644 index 00000000000..6c5679a95bb --- /dev/null +++ b/www-client/elinks/files/elinks-0.12_pre5-rand-egd.patch @@ -0,0 +1,20 @@ +--- 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());