mirror of
https://github.com/void-linux/void-packages.git
synced 2025-07-29 17:02:56 +02:00
qt5: fix libressl-2.7
This commit is contained in:
parent
d360927622
commit
32eac3dd53
4 changed files with 24 additions and 114 deletions
|
@ -1,100 +0,0 @@
|
||||||
--- qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
||||||
+++ qtbase/src/network/ssl/qsslellipticcurve_openssl.cpp 2017-02-21 16:25:56.477986158 +0100
|
|
||||||
@@ -83,7 +83,7 @@
|
|
||||||
const QByteArray curveNameLatin1 = name.toLatin1();
|
|
||||||
int nid = q_OBJ_sn2nid(curveNameLatin1.data());
|
|
||||||
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (nid == 0 && QSslSocket::sslLibraryVersionNumber() >= 0x10002000L)
|
|
||||||
nid = q_EC_curve_nist2nid(curveNameLatin1.data());
|
|
||||||
#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
||||||
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp 2017-02-21 19:14:32.805677245 +0100
|
|
||||||
@@ -791,7 +791,7 @@
|
|
||||||
RESOLVEFUNC(EC_GROUP_get_degree)
|
|
||||||
#endif
|
|
||||||
RESOLVEFUNC(BN_num_bits)
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
RESOLVEFUNC(BN_is_word)
|
|
||||||
#endif
|
|
||||||
RESOLVEFUNC(BN_mod_word)
|
|
||||||
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-01-18 15:20:58.000000000 +0100
|
|
||||||
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2017-02-21 19:15:38.083714302 +0100
|
|
||||||
@@ -228,7 +228,7 @@
|
|
||||||
Q_AUTOTEST_EXPORT BIO_METHOD *q_BIO_s_mem();
|
|
||||||
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
|
|
||||||
int q_BN_num_bits(const BIGNUM *a);
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
|
||||||
#else
|
|
||||||
// BN_is_word is implemented purely as a
|
|
||||||
@@ -241,7 +241,7 @@
|
|
||||||
//
|
|
||||||
// Users are required to include <openssl/bn.h>.
|
|
||||||
#define q_BN_is_word BN_is_word
|
|
||||||
-#endif // OPENSSL_VERSION_NUMBER >= 0x10100000L
|
|
||||||
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10100000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
|
|
||||||
#ifndef OPENSSL_NO_EC
|
|
||||||
const EC_GROUP* q_EC_KEY_get0_group(const EC_KEY* k);
|
|
||||||
@@ -509,13 +509,13 @@
|
|
||||||
|
|
||||||
// EC curves management
|
|
||||||
size_t q_EC_get_builtin_curves(EC_builtin_curve *r, size_t nitems);
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
int q_EC_curve_nist2nid(const char *name);
|
|
||||||
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
#endif // OPENSSL_NO_EC
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
#define q_SSL_get_server_tmp_key(ssl, key) q_SSL_ctrl((ssl), SSL_CTRL_GET_SERVER_TMP_KEY, 0, (char *)key)
|
|
||||||
-#endif // OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#endif // (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
|
|
||||||
// PKCS#12 support
|
|
||||||
int q_PKCS12_parse(PKCS12 *p12, const char *pass, EVP_PKEY **pkey, X509 **cert, STACK_OF(X509) **ca);
|
|
||||||
--- qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-01-18 15:20:58.000000000 +0100
|
|
||||||
+++ qtbase/src/network/ssl/qsslcontext_openssl.cpp 2017-02-21 19:23:04.291975945 +0100
|
|
||||||
@@ -159,7 +159,7 @@
|
|
||||||
m_npnContext.data = reinterpret_cast<unsigned char *>(m_supportedNPNVersions.data());
|
|
||||||
m_npnContext.len = m_supportedNPNVersions.count();
|
|
||||||
m_npnContext.status = QSslConfiguration::NextProtocolNegotiationNone;
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (QSslSocket::sslLibraryVersionNumber() >= 0x10002000L) {
|
|
||||||
// Callback's type has a parameter 'const unsigned char ** out'
|
|
||||||
// since it was introduced in 1.0.2. Internally, OpenSSL's own code
|
|
||||||
--- qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2017-11-30 14:49:46.000000000 +0100
|
|
||||||
+++ qtbase/src/network/ssl/qsslsocket_opensslpre11.cpp 2018-01-27 18:06:50.939540932 +0100
|
|
||||||
@@ -228,7 +228,7 @@
|
|
||||||
q_SSL_load_error_strings();
|
|
||||||
q_OpenSSL_add_all_algorithms_safe();
|
|
||||||
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10001000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10001000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (q_SSLeay() >= 0x10001000L)
|
|
||||||
QSslSocketBackendPrivate::s_indexForSSLExtraData = q_SSL_get_ex_new_index(0L, NULL, NULL, NULL, NULL);
|
|
||||||
#endif
|
|
||||||
@@ -382,7 +382,7 @@
|
|
||||||
} else {
|
|
||||||
const unsigned char *proto = 0;
|
|
||||||
unsigned int proto_len = 0;
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (q_SSLeay() >= 0x10002000L) {
|
|
||||||
q_SSL_get0_alpn_selected(ssl, &proto, &proto_len);
|
|
||||||
if (proto_len && mode == QSslSocket::SslClientMode) {
|
|
||||||
@@ -405,7 +405,7 @@
|
|
||||||
}
|
|
||||||
#endif // OPENSSL_VERSION_NUMBER >= 0x1000100fL ...
|
|
||||||
|
|
||||||
-#if OPENSSL_VERSION_NUMBER >= 0x10002000L
|
|
||||||
+#if (OPENSSL_VERSION_NUMBER >= 0x10002000L) && !defined(LIBRESSL_VERSION_NUMBER)
|
|
||||||
if (q_SSLeay() >= 0x10002000L && mode == QSslSocket::SslClientMode) {
|
|
||||||
EVP_PKEY *key;
|
|
||||||
if (q_SSL_get_server_tmp_key(ssl, &key))
|
|
23
srcpkgs/qt5/patches/libressl-disable-1.1-APIs.patch
Normal file
23
srcpkgs/qt5/patches/libressl-disable-1.1-APIs.patch
Normal file
|
@ -0,0 +1,23 @@
|
||||||
|
--- ./qtbase/config.tests/unix/openssl11/openssl.cpp.orig 2018-04-24 09:59:45.918038335 +0200
|
||||||
|
+++ ./qtbase/config.tests/unix/openssl11/openssl.cpp 2018-04-24 10:01:21.255182441 +0200
|
||||||
|
@@ -42,6 +42,9 @@
|
||||||
|
#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
|
||||||
|
# error "OpenSSL >= 1.1 is required"
|
||||||
|
#endif
|
||||||
|
+#ifdef LIBRESSL_VERSION_NUMBER
|
||||||
|
+# error "LibreSSL does not support all used OpenSSL-1.1 APIs yet."
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
int main()
|
||||||
|
{
|
||||||
|
--- ./qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h.orig 2018-04-24 10:40:49.121761681 +0200
|
||||||
|
+++ ./qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h 2018-04-24 10:41:43.082843248 +0200
|
||||||
|
@@ -232,7 +232,7 @@ BIO *q_BIO_new_mem_buf(void *a, int b);
|
||||||
|
int q_BIO_read(BIO *a, void *b, int c);
|
||||||
|
Q_AUTOTEST_EXPORT int q_BIO_write(BIO *a, const void *b, int c);
|
||||||
|
int q_BN_num_bits(const BIGNUM *a);
|
||||||
|
-#if OPENSSL_VERSION_NUMBER >= 0x10100000L
|
||||||
|
+#if OPENSSL_VERSION_NUMBER >= 0x10100000L && !defined(LIBRESSL_VERSION_NUMBER)
|
||||||
|
int q_BN_is_word(BIGNUM *a, BN_ULONG w);
|
||||||
|
#else
|
||||||
|
// BN_is_word is implemented purely as a
|
|
@ -1,13 +0,0 @@
|
||||||
Prevent detection of libressl as openssl >= 1.1
|
|
||||||
|
|
||||||
--- qtbase/config.tests/unix/openssl11/openssl.cpp 2017-11-30 14:49:46.000000000 +0100
|
|
||||||
+++ qtbase/config.tests/unix/openssl11/openssl.cpp 2018-01-27 18:01:17.206523715 +0100
|
|
||||||
@@ -39,7 +39,7 @@
|
|
||||||
|
|
||||||
#include <openssl/opensslv.h>
|
|
||||||
|
|
||||||
-#if !defined(OPENSSL_VERSION_NUMBER) || OPENSSL_VERSION_NUMBER-0 < 0x10100000L
|
|
||||||
+#if !defined(OPENSSL_VERSION_NUMBER) || defined(LIBRESSL_VERSION_NUMBER) || (OPENSSL_VERSION_NUMBER-0 < 0x10100000L)
|
|
||||||
# error "OpenSSL >= 1.1 is required"
|
|
||||||
#endif
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Template file for 'qt5'
|
# Template file for 'qt5'
|
||||||
pkgname=qt5
|
pkgname=qt5
|
||||||
version=5.10.1
|
version=5.10.1
|
||||||
revision=7
|
revision=8
|
||||||
wrksrc="qt-everywhere-src-${version}"
|
wrksrc="qt-everywhere-src-${version}"
|
||||||
build_style=gnu-configure
|
build_style=gnu-configure
|
||||||
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
|
hostmakedepends="flex ruby gperf git python perl pkg-config protobuf re2c ninja"
|
||||||
|
|
Loading…
Add table
Reference in a new issue