From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [RFC v1] qt5base: fix libressl compile
Date: Thu, 20 Sep 2018 23:38:33 +0200 [thread overview]
Message-ID: <20180920233833.7391f81a@windsurf> (raw)
In-Reply-To: <20180911200505.20234-1-ps.report@gmx.net>
Hello,
On Tue, 11 Sep 2018 22:05:05 +0200, Peter Seiderer wrote:
> Add freebsd provided patch to fix libressl compile (patch taken
> from [1]/[2], for upstream status see [3]), fixes bug #11341 ([4]).
>
> [1] https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=228344
> [2] https://bz-attachments.freebsd.org/attachment.cgi?id=196994
> [3] https://bugreports.qt.io/browse/QTBUG-68374
> [4] https://bugs.busybox.net/show_bug.cgi?id=11341
Upstream is not very helpful "We don't support LibreSSL". Could you
perhaps participate to the bug report to say Buildroot is also
interested in seeing LibreSSL supported by Qt ?
> diff --git a/package/qt5/qt5base/5.11.1/0005-qtbase-fix-libressl-compile.patch b/package/qt5/qt5base/5.11.1/0005-qtbase-fix-libressl-compile.patch
Why are you patching only the 5.11.1 version, and not also the LTS
version ?
> +-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
> ++#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L || defined(LIBRESSL_VERSION_NUMBER)
> + # error "OpenSSL >= 1.1 is required"
I don't have the full code context here, but isn't this going to #error
when using LibreSSL, because defined(LIBRESSL_VERSION_NUMBER) is true ?
> +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
> ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
> + if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
> + QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
> + if (cctx) {
> +diff --git a/src/network/ssl/qsslsocket_openssl_symbols.cpp b/src/network/ssl/qsslsocket_openssl_symbols.cpp
> +index 466eba0bd0..c7d89436ca 100644
> +--- a/src/network/ssl/qsslsocket_openssl_symbols.cpp
> ++++ b/src/network/ssl/qsslsocket_openssl_symbols.cpp
> +@@ -406,7 +406,7 @@ DEFINEFUNC2(int, SSL_CTX_use_PrivateKey, SSL_CTX *a, a, EVP_PKEY *b, b, return -
> + DEFINEFUNC2(int, SSL_CTX_use_RSAPrivateKey, SSL_CTX *a, a, RSA *b, b, return -1, return)
> + DEFINEFUNC3(int, SSL_CTX_use_PrivateKey_file, SSL_CTX *a, a, const char *b, b, int c, c, return -1, return)
> + DEFINEFUNC(X509_STORE *, SSL_CTX_get_cert_store, const SSL_CTX *a, a, return 0, return)
> +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
> ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
> + DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return 0, return);
> + DEFINEFUNC(void, SSL_CONF_CTX_free, SSL_CONF_CTX *a, a, return ,return);
> + DEFINEFUNC2(void, SSL_CONF_CTX_set_ssl_ctx, SSL_CONF_CTX *a, a, SSL_CTX *b, b, return, return);
> +@@ -1123,12 +1123,14 @@ bool q_resolveOpenSslSymbols()
> + RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
> + RESOLVEFUNC(SSL_CTX_get_cert_store);
> + #if OPENSSL_VERSION_NUMBER >= 0x10002000L
> ++#if !defined(LIBRESSL_VERSION_NUMBER)
Why not && !defined(LIBRESSL_VERSION_NUMBER)
like is done in the previous chunk, and the next one ?
> +diff --git a/src/network/ssl/qsslsocket_openssl_symbols_p.h b/src/network/ssl/qsslsocket_openssl_symbols_p.h
> +index 68b519d74e..7f7f816803 100644
> +--- a/src/network/ssl/qsslsocket_openssl_symbols_p.h
> ++++ b/src/network/ssl/qsslsocket_openssl_symbols_p.h
> +@@ -356,7 +356,7 @@ int q_SSL_CTX_use_PrivateKey(SSL_CTX *a, EVP_PKEY *b);
> + int q_SSL_CTX_use_RSAPrivateKey(SSL_CTX *a, RSA *b);
> + int q_SSL_CTX_use_PrivateKey_file(SSL_CTX *a, const char *b, int c);
> + X509_STORE *q_SSL_CTX_get_cert_store(const SSL_CTX *a);
> +-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
> ++#if OPENSSL_VERSION_NUMBER >= 0x10002000L && !defined(LIBRESSL_VERSION_NUMBER)
> + SSL_CONF_CTX *q_SSL_CONF_CTX_new();
> + void q_SSL_CONF_CTX_free(SSL_CONF_CTX *a);
> + void q_SSL_CONF_CTX_set_ssl_ctx(SSL_CONF_CTX *a, SSL_CTX *b);
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com
next prev parent reply other threads:[~2018-09-20 21:38 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-11 20:05 [Buildroot] [RFC v1] qt5base: fix libressl compile Peter Seiderer
2018-09-20 21:38 ` Thomas Petazzoni [this message]
2018-09-21 9:31 ` Philipp Richter
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=20180920233833.7391f81a@windsurf \
--to=thomas.petazzoni@bootlin.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.