From: Peter Korsgaard <peter@korsgaard.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH 02/10] package/nut: Add support for openssl 1.1.x
Date: Sun, 27 Jan 2019 22:02:37 +0100 [thread overview]
Message-ID: <87imy9olua.fsf@dell.be.48ers.dk> (raw)
In-Reply-To: <20190125160420.10932-2-patrick.havelange@essensium.com> (Patrick Havelange's message of "Fri, 25 Jan 2019 17:04:12 +0100")
>>>>> "Patrick" == Patrick Havelange <patrick.havelange@essensium.com> writes:
> From: Vadim Kochan <vadim4j@gmail.com>
> Signed-off-by: Vadim Kochan <vadim4j@gmail.com>
> Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
> ---
> Changes v6:
> - use the actual upstream patch
> - drop unrelated patch
> ---
> ...Add-compatibility-with-openssl-1.1.0.patch | 75 +++++++++++++++++++
> 1 file changed, 75 insertions(+)
> create mode 100644 package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch
> diff --git a/package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch b/package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch
> new file mode 100644
> index 0000000000..65b7f2d6f7
> --- /dev/null
> +++ b/package/nut/0003-Add-compatibility-with-openssl-1.1.0.patch
> @@ -0,0 +1,75 @@
> +From fcbf18c92918ce5e81d0aab62a7aed5c2245ea4d Mon Sep 17 00:00:00 2001
> +From: Eneas U de Queiroz <cote2004-github@yahoo.com>
> +Date: Fri, 1 Jun 2018 11:17:28 -0300
> +Subject: [PATCH 1/2] Add compatibility with openssl 1.1.0
> +
> +Minor adjustments were needed:
> +* Openssl 1.1 libs do not need to be initialized.
> +* TLSv*_method became TLS_*_method.
> +
> +Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
> +Upstream: https://github.com/networkupstools/nut/pull/558/
> +Signed-off-by: Patrick Havelange <patrick.havelange@essensium.com>
> +---
> + clients/upsclient.c | 5 ++++-
> + m4/nut_check_libopenssl.m4 | 2 +-
> + server/netssl.c | 7 +++++--
> + 3 files changed, 10 insertions(+), 4 deletions(-)
> +
> +diff --git a/clients/upsclient.c b/clients/upsclient.c
> +index b90587b0..053d60fb 100644
> +--- a/clients/upsclient.c
> ++++ b/clients/upsclient.c
> +@@ -316,10 +316,13 @@ int upscli_init(int certverify, const char *certpath,
> +
> + #ifdef WITH_OPENSSL
> +
> ++# if OPENSSL_VERSION_NUMBER < 0x10100000L
> + SSL_library_init();
> + SSL_load_error_strings();
> ++# define TLS_client_method TLSv1_client_method
> ++# endif /* OPENSSL_VERSION_NUMBER < 0x10100000L */
> +
> +- ssl_method = TLSv1_client_method();
> ++ ssl_method = TLS_client_method();
> +
> + if (!ssl_method) {
> + return 0;
> +diff --git a/m4/nut_check_libopenssl.m4 b/m4/nut_check_libopenssl.m4
> +index 1b875077..7eb401cd 100644
> +--- a/m4/nut_check_libopenssl.m4
> ++++ b/m4/nut_check_libopenssl.m4
> +@@ -58,7 +58,7 @@ if test -z "${nut_have_libopenssl_seen}"; then
> +
> + dnl check if openssl is usable
> + AC_CHECK_HEADERS(openssl/ssl.h, [nut_have_openssl=yes], [nut_have_openssl=no], [AC_INCLUDES_DEFAULT])
> +- AC_CHECK_FUNCS(SSL_library_init, [], [nut_have_openssl=no])
> ++ AC_CHECK_FUNCS(SSL_CTX_new, [], [nut_have_openssl=no])
> +
> + if test "${nut_have_openssl}" = "yes"; then
> + nut_with_ssl="yes"
> +diff --git a/server/netssl.c b/server/netssl.c
> +index c2f40989..0289e296 100644
> +--- a/server/netssl.c
> ++++ b/server/netssl.c
> +@@ -387,12 +387,15 @@ void ssl_init(void)
> +
> + #ifdef WITH_OPENSSL
> +
> ++# if OPENSSL_VERSION_NUMBER < 0x10100000L
The libshout patch alternatively checked for libressl, but that is not
done here?
--
Bye, Peter Korsgaard
next prev parent reply other threads:[~2019-01-27 21:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-01-25 16:04 [Buildroot] [PATCH 01/10] package/libshout: Add support for openssl 1.1.x Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 02/10] package/nut: " Patrick Havelange
2019-01-27 21:02 ` Peter Korsgaard [this message]
2019-01-27 21:04 ` Peter Korsgaard
2019-01-28 16:47 ` Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 03/10] package/vboot-utils: " Patrick Havelange
2019-01-27 21:10 ` Peter Korsgaard
2019-01-25 16:04 ` [Buildroot] [PATCH 04/10] package/pound: Fix build with OpenSSL 1.1.x Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 05/10] mariadb: use host-openssl from buildroot-system Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 06/10] Introduce the variable BR2_TOOLCHAIN_HAS_UCONTEXT Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 07/10] package/thrift: bump to 0.12.0, add support for openssl 1.1.x Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 08/10] package/rtmpdump: Fix compilation issues with " Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 09/10] freeswitch: bump to git master 8f10ae54a18a19fc6ed938e4f662bd218ba54b5e Patrick Havelange
2019-01-25 16:04 ` [Buildroot] [PATCH 10/10] libopenssl: bump version to 1.1.1a Patrick Havelange
2019-01-27 20:43 ` [Buildroot] [PATCH 01/10] package/libshout: Add support for openssl 1.1.x Peter Korsgaard
2019-01-28 16:49 ` Patrick Havelange
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87imy9olua.fsf@dell.be.48ers.dk \
--to=peter@korsgaard.com \
--cc=buildroot@busybox.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox