qt5: rebuild against OpenSSL

This commit is contained in:
John 2021-01-06 18:18:40 +01:00
parent ea41b068f5
commit 85099bc4ed
3 changed files with 81 additions and 503 deletions

View file

@ -1925,87 +1925,87 @@ libgltf-0.1.so.1 libgltf-0.1.0_1
libabw-0.1.so.1 libabw-0.1.0_1
libcmis-0.5.so.5 libcmis-0.5.0_1
libcmis-c-0.5.so.5 libcmis-0.5.0_1
libQt5Bluetooth.so.5 qt5-connectivity-5.15.0_1
libQt53DAnimation.so.5 qt5-3d-5.15.0_1
libQt53DCore.so.5 qt5-3d-5.15.0_1
libQt53DInput.so.5 qt5-3d-5.15.0_1
libQt53DLogic.so.5 qt5-3d-5.15.0_1
libQt53DRender.so.5 qt5-3d-5.15.0_1
libQt53DQuick.so.5 qt5-3d-5.15.0_1
libQt53DQuickInput.so.5 qt5-3d-5.15.0_1
libQt53DQuickRender.so.5 qt5-3d-5.15.0_1
libQt53DQuickScene2D.so.5 qt5-3d-5.15.0_1
libQt53DExtras.so.5 qt5-3d-5.15.0_1
libQt53DQuickExtras.so.5 qt5-3d-5.15.0_1
libQt53DQuickAnimation.so.5 qt5-3d-5.15.0_1
libQt53DQuickInput.so.5 qt5-3d-5.15.0_1
libQt5Charts.so.5 qt5-charts-5.15.0_1
libQt5DataVisualization.so.5 qt5-datavis3d-5.15.0_1
libQt5Gamepad.so.5 qt5-gamepad-5.15.0_1
libQt5Nfc.so.5 qt5-connectivity-5.15.0_1
libQt5Bluetooth.so.5 qt5-connectivity-5.15.2_3
libQt53DAnimation.so.5 qt5-3d-5.15.2_3
libQt53DCore.so.5 qt5-3d-5.15.2_3
libQt53DInput.so.5 qt5-3d-5.15.2_3
libQt53DLogic.so.5 qt5-3d-5.15.2_3
libQt53DRender.so.5 qt5-3d-5.15.2_3
libQt53DQuick.so.5 qt5-3d-5.15.2_3
libQt53DQuickInput.so.5 qt5-3d-5.15.2_3
libQt53DQuickRender.so.5 qt5-3d-5.15.2_3
libQt53DQuickScene2D.so.5 qt5-3d-5.15.2_3
libQt53DExtras.so.5 qt5-3d-5.15.2_3
libQt53DQuickExtras.so.5 qt5-3d-5.15.2_3
libQt53DQuickAnimation.so.5 qt5-3d-5.15.2_3
libQt53DQuickInput.so.5 qt5-3d-5.15.2_3
libQt5Charts.so.5 qt5-charts-5.15.2_3
libQt5DataVisualization.so.5 qt5-datavis3d-5.15.2_3
libQt5Gamepad.so.5 qt5-gamepad-5.15.2_3
libQt5Nfc.so.5 qt5-connectivity-5.15.2_3
libQt5WebView.so.5 qt5-webview-5.15.0_1
libQt5Qml.so.5 qt5-declarative-5.15.0_1
libQt5QmlDevTools.so.5 qt5-declarative-5.15.0_1
libQt5Quick.so.5 qt5-declarative-5.15.0_1
libQt5QuickTest.so.5 qt5-declarative-5.15.0_1
libQt5QuickWidgets.so.5 qt5-declarative-5.15.0_1
libQt5QuickParticles.so.5 qt5-declarative-5.15.0_1
libQt5QuickShapes.so.5 qt5-declarative-5.15.0_1
libQt5QmlModels.so.5 qt5-declarative-5.15.0_1
libQt5QmlWorkerScript.so.5 qt5-declarative-5.15.0_1
libQt5QuickControls2.so.5 qt5-quickcontrols2-5.15.0_1
libQt5QuickTemplates2.so.5 qt5-quickcontrols2-5.15.0_1
libQt5Positioning.so.5 qt5-location-5.15.0_1
libQt5Location.so.5 qt5-location-5.15.0_1
libQt5PositioningQuick.so.5 qt5-location-5.15.0_1
libQt5VirtualKeyboard.so.5 qt5-virtualkeyboard-5.15.0_1
libQt5Multimedia.so.5 qt5-multimedia-5.15.0_1
libQt5MultimediaGstTools.so.5 qt5-multimedia-5.15.0_1
libQt5MultimediaQuick.so.5 qt5-multimedia-5.15.0_1
libQt5MultimediaQuick_p.so.5 qt5-multimedia-5.15.0_1
libQt5MultimediaWidgets.so.5 qt5-multimedia-5.15.0_1
libQt5NetworkAuth.so.5 qt5-networkauth-5.15.0_1
libQt5Purchasing.so.5 qt5-purchasing-5.15.0_1
libQt5RemoteObjects.so.5 qt5-remoteobjects-5.15.0_1
libqgsttools_p.so.1 qt5-multimedia-5.15.0_1
libQt5LabsTemplates.so.5 qt5-quickcontrols2-5.15.0_1
libQt5Scxml.so.5 qt5-scxml-5.15.0_1
libQt5Script.so.5 qt5-script-5.15.0_1
libQt5ScriptTools.so.5 qt5-script-5.15.0_1
libQt5Sensors.so.5 qt5-sensors-5.15.0_1
libQt5SerialBus.so.5 qt5-serialbus-5.15.0_1
libQt5SerialPort.so.5 qt5-serialport-5.15.0_1
libQt5Svg.so.5 qt5-svg-5.15.0_1
libQt5CLucene.so.5 qt5-tools-5.15.0_1
libQt5Help.so.5 qt5-tools-5.15.0_1
libQt5Designer.so.5 qt5-tools-5.15.0_1
libQt5DesignerComponents.so.5 qt5-tools-5.15.0_1
libQt5WaylandClient.so.5 qt5-wayland-5.15.0_1
libQt5WaylandCompositor.so.5 qt5-wayland-5.15.0_1
libQt5WebChannel.so.5 qt5-webchannel-5.15.0_1
libQt5Qml.so.5 qt5-declarative-5.15.2_3
libQt5QmlDevTools.so.5 qt5-declarative-5.15.2_3
libQt5Quick.so.5 qt5-declarative-5.15.2_3
libQt5QuickTest.so.5 qt5-declarative-5.15.2_3
libQt5QuickWidgets.so.5 qt5-declarative-5.15.2_3
libQt5QuickParticles.so.5 qt5-declarative-5.15.2_3
libQt5QuickShapes.so.5 qt5-declarative-5.15.2_3
libQt5QmlModels.so.5 qt5-declarative-5.15.2_3
libQt5QmlWorkerScript.so.5 qt5-declarative-5.15.2_3
libQt5QuickControls2.so.5 qt5-quickcontrols2-5.15.2_3
libQt5QuickTemplates2.so.5 qt5-quickcontrols2-5.15.2_3
libQt5Positioning.so.5 qt5-location-5.15.2_3
libQt5Location.so.5 qt5-location-5.15.2_3
libQt5PositioningQuick.so.5 qt5-location-5.15.2_3
libQt5VirtualKeyboard.so.5 qt5-virtualkeyboard-5.15.2_3
libQt5Multimedia.so.5 qt5-multimedia-5.15.2_3
libQt5MultimediaGstTools.so.5 qt5-multimedia-5.15.2_3
libQt5MultimediaQuick.so.5 qt5-multimedia-5.15.2_3
libQt5MultimediaQuick_p.so.5 qt5-multimedia-5.15.2_3
libQt5MultimediaWidgets.so.5 qt5-multimedia-5.15.2_3
libQt5NetworkAuth.so.5 qt5-networkauth-5.15.2_3
libQt5Purchasing.so.5 qt5-purchasing-5.15.2_3
libQt5RemoteObjects.so.5 qt5-remoteobjects-5.15.2_3
libqgsttools_p.so.1 qt5-multimedia-5.15.2_3
libQt5LabsTemplates.so.5 qt5-quickcontrols2-5.15.2_3
libQt5Scxml.so.5 qt5-scxml-5.15.2_3
libQt5Script.so.5 qt5-script-5.15.2_3
libQt5ScriptTools.so.5 qt5-script-5.15.2_3
libQt5Sensors.so.5 qt5-sensors-5.15.2_3
libQt5SerialBus.so.5 qt5-serialbus-5.15.2_3
libQt5SerialPort.so.5 qt5-serialport-5.15.2_3
libQt5Svg.so.5 qt5-svg-5.15.2_3
libQt5CLucene.so.5 qt5-tools-5.15.2_3
libQt5Help.so.5 qt5-tools-5.15.2_3
libQt5Designer.so.5 qt5-tools-5.15.2_3
libQt5DesignerComponents.so.5 qt5-tools-5.15.2_3
libQt5WaylandClient.so.5 qt5-wayland-5.15.2_3
libQt5WaylandCompositor.so.5 qt5-wayland-5.15.2_3
libQt5WebChannel.so.5 qt5-webchannel-5.15.2_3
libQt5WebEngineCore.so.5 qt5-webengine-5.15.0_1
libQt5WebEngine.so.5 qt5-webengine-5.15.0_1
libQt5WebEngineWidgets.so.5 qt5-webengine-5.15.0_1
libQt5WebSockets.so.5 qt5-websockets-5.15.0_1
libQt5X11Extras.so.5 qt5-x11extras-5.15.0_1
libQt5XmlPatterns.so.5 qt5-xmlpatterns-5.15.0_1
libQt5Core.so.5 qt5-core-5.15.0_1
libQt5EglFSDeviceIntegration.so.5 qt5-gui-5.15.0_1
libQt5Network.so.5 qt5-network-5.15.0_1
libQt5Sql.so.5 qt5-sql-5.15.0_1
libQt5Xml.so.5 qt5-xml-5.15.0_1
libQt5Gui.so.5 qt5-gui-5.15.0_1
libQt5Widgets.so.5 qt5-widgets-5.15.0_1
libQt5Test.so.5 qt5-test-5.15.0_1
libQt5DBus.so.5 qt5-dbus-5.15.0_1
libQt5Concurrent.so.5 qt5-concurrent-5.15.0_1
libQt5OpenGL.so.5 qt5-opengl-5.15.0_1
libQt5PrintSupport.so.5 qt5-printsupport-5.15.0_1
libQt5XcbQpa.so.5 qt5-gui-5.15.0_1
libQt5EglDeviceIntegration.so.5 qt5-gui-5.15.0_1
libQt5EglFsKmsSupport.so.5 qt5-gui-5.15.0_1
libQt5TextToSpeech.so.5 qt5-speech-5.15.0_1
libQt5Bodymovin.so.5 qt5-lottie-5.15.0_1
libQt5WebSockets.so.5 qt5-websockets-5.15.2_3
libQt5X11Extras.so.5 qt5-x11extras-5.15.2_3
libQt5XmlPatterns.so.5 qt5-xmlpatterns-5.15.2_3
libQt5Core.so.5 qt5-core-5.15.2_3
libQt5EglFSDeviceIntegration.so.5 qt5-gui-5.15.2_3
libQt5Network.so.5 qt5-network-5.15.2_3
libQt5Sql.so.5 qt5-sql-5.15.2_3
libQt5Xml.so.5 qt5-xml-5.15.2_3
libQt5Gui.so.5 qt5-gui-5.15.2_3
libQt5Widgets.so.5 qt5-widgets-5.15.2_3
libQt5Test.so.5 qt5-test-5.15.2_3
libQt5DBus.so.5 qt5-dbus-5.15.2_3
libQt5Concurrent.so.5 qt5-concurrent-5.15.2_3
libQt5OpenGL.so.5 qt5-opengl-5.15.2_3
libQt5PrintSupport.so.5 qt5-printsupport-5.15.2_3
libQt5XcbQpa.so.5 qt5-gui-5.15.2_3
libQt5EglDeviceIntegration.so.5 qt5-gui-5.15.2_3
libQt5EglFsKmsSupport.so.5 qt5-gui-5.15.2_3
libQt5TextToSpeech.so.5 qt5-speech-5.15.2_3
libQt5Bodymovin.so.5 qt5-lottie-5.15.2_3
libQt5WebKit.so.5 qt5-webkit-5.6.0_1
libQt5WebKitWidgets.so.5 qt5-webkit-5.6.0_1
libx265.so.192 x265-3.4_1

View file

@ -1,420 +0,0 @@
From 2aa448121ff62e104d333f192a7f19fc76d0cf19 Mon Sep 17 00:00:00 2001
From: Stefan Strogin <steils@gentoo.org>
Date: Wed, 5 Feb 2020 03:49:35 +0200
Subject: [PATCH] [PATCH] QSslSocket - add LibreSSL support
Upstream-Status: Inappropriate
[Upstream is not willing to accept any patches for LibreSSL support]
Signed-off-by: Stefan Strogin <steils@gentoo.org>
---
src/network/ssl/qsslcertificate_openssl.cpp | 2 +-
src/network/ssl/qsslcontext_openssl.cpp | 19 +++++++-
src/network/ssl/qsslcontext_openssl_p.h | 7 +++
src/network/ssl/qsslkey_openssl.cpp | 2 +-
src/network/ssl/qsslsocket_openssl.cpp | 2 +-
.../ssl/qsslsocket_openssl_symbols.cpp | 37 ++++++++++++++-
.../ssl/qsslsocket_openssl_symbols_p.h | 45 ++++++++++++++++++-
7 files changed, 107 insertions(+), 7 deletions(-)
diff --git qtbase/src/network/ssl/qsslcertificate_openssl.cpp qtbase/src/network/ssl/qsslcertificate_openssl.cpp
index ca9d61ccb1..19774432ce 100644
--- qtbase/src/network/ssl/qsslcertificate_openssl.cpp
+++ qtbase/src/network/ssl/qsslcertificate_openssl.cpp
@@ -661,7 +661,7 @@ static QMultiMap<QByteArray, QString> _q_mapFromX509Name(X509_NAME *name)
unsigned char *data = nullptr;
int size = q_ASN1_STRING_to_UTF8(&data, q_X509_NAME_ENTRY_get_data(e));
info.insert(name, QString::fromUtf8((char*)data, size));
-#if QT_CONFIG(opensslv11)
+#if QT_CONFIG(opensslv11) && !defined(LIBRESSL_VERSION_NUMBER)
q_CRYPTO_free(data, nullptr, 0);
#else
q_CRYPTO_free(data);
diff --git qtbase/src/network/ssl/qsslcontext_openssl.cpp qtbase/src/network/ssl/qsslcontext_openssl.cpp
index c9f202f573..2ecdbbb7e5 100644
--- qtbase/src/network/ssl/qsslcontext_openssl.cpp
+++ qtbase/src/network/ssl/qsslcontext_openssl.cpp
@@ -351,9 +351,11 @@ init_context:
return;
}
+#ifndef LIBRESSL_VERSION_NUMBER
// A nasty hacked OpenSSL using a level that will make our auto-tests fail:
if (q_SSL_CTX_get_security_level(sslContext->ctx) > 1 && *forceSecurityLevel())
q_SSL_CTX_set_security_level(sslContext->ctx, 1);
+#endif
const long anyVersion =
#if QT_CONFIG(dtls)
@@ -408,16 +410,28 @@ init_context:
maxVersion = DTLS1_VERSION;
break;
case QSsl::DtlsV1_0OrLater:
+#ifdef DTLS_MAX_VERSION
minVersion = DTLS1_VERSION;
maxVersion = DTLS_MAX_VERSION;
+#else
+ Q_UNREACHABLE();
+#endif // DTLS_MAX_VERSION
break;
case QSsl::DtlsV1_2:
+#ifdef DTLS1_2_VERSION
minVersion = DTLS1_2_VERSION;
maxVersion = DTLS1_2_VERSION;
+#else
+ Q_UNREACHABLE();
+#endif // DTLS1_2_VERSION
break;
case QSsl::DtlsV1_2OrLater:
+#if defined(DTLS1_2_VERSION) && defined(DTLS_MAX_VERSION)
minVersion = DTLS1_2_VERSION;
maxVersion = DTLS_MAX_VERSION;
+#else
+ Q_UNREACHABLE();
+#endif // DTLS1_2_VERSION && DTLS_MAX_VERSION
break;
case QSsl::TlsV1_3OrLater:
#ifdef TLS1_3_VERSION
@@ -722,6 +736,7 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
}
#endif // ocsp
+#ifndef LIBRESSL_VERSION_NUMBER
QSharedPointer<SSL_CONF_CTX> cctx(q_SSL_CONF_CTX_new(), &q_SSL_CONF_CTX_free);
if (cctx) {
q_SSL_CONF_CTX_set_ssl_ctx(cctx.data(), sslContext->ctx);
@@ -768,7 +783,9 @@ void QSslContext::applyBackendConfig(QSslContext *sslContext)
sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_finish() failed"));
sslContext->errorCode = QSslError::UnspecifiedError;
}
- } else {
+ } else
+#endif // LIBRESSL_VERSION_NUMBER
+ {
sslContext->errorStr = msgErrorSettingBackendConfig(QSslSocket::tr("SSL_CONF_CTX_new() failed"));
sslContext->errorCode = QSslError::UnspecifiedError;
}
diff --git qtbase/src/network/ssl/qsslcontext_openssl_p.h qtbase/src/network/ssl/qsslcontext_openssl_p.h
index 70cb97aad8..01a61cf535 100644
--- qtbase/src/network/ssl/qsslcontext_openssl_p.h
+++ qtbase/src/network/ssl/qsslcontext_openssl_p.h
@@ -61,6 +61,13 @@
QT_BEGIN_NAMESPACE
+#ifndef DTLS_ANY_VERSION
+#define DTLS_ANY_VERSION 0x1FFFF
+#endif
+#ifndef TLS_ANY_VERSION
+#define TLS_ANY_VERSION 0x10000
+#endif
+
#ifndef QT_NO_SSL
class QSslContextPrivate;
diff --git qtbase/src/network/ssl/qsslkey_openssl.cpp qtbase/src/network/ssl/qsslkey_openssl.cpp
index 43cb8c6de8..a27336aa26 100644
--- qtbase/src/network/ssl/qsslkey_openssl.cpp
+++ qtbase/src/network/ssl/qsslkey_openssl.cpp
@@ -360,7 +360,7 @@ static QByteArray doCrypt(QSslKeyPrivate::Cipher cipher, const QByteArray &data,
q_EVP_CipherUpdate(ctx,
reinterpret_cast<unsigned char *>(output.data()), &len,
reinterpret_cast<const unsigned char *>(data.constData()), data.size());
- q_EVP_CipherFinal(ctx,
+ q_EVP_CipherFinal_ex(ctx,
reinterpret_cast<unsigned char *>(output.data()) + len, &i);
len += i;
diff --git qtbase/src/network/ssl/qsslsocket_openssl.cpp qtbase/src/network/ssl/qsslsocket_openssl.cpp
index 277037e59c..f599498df5 100644
--- qtbase/src/network/ssl/qsslsocket_openssl.cpp
+++ qtbase/src/network/ssl/qsslsocket_openssl.cpp
@@ -653,7 +653,7 @@ bool QSslSocketBackendPrivate::initSslContext()
else if (mode == QSslSocket::SslServerMode)
q_SSL_set_psk_server_callback(ssl, &q_ssl_psk_server_callback);
-#if OPENSSL_VERSION_NUMBER >= 0x10101006L
+#if OPENSSL_VERSION_NUMBER >= 0x10101006L && !defined(LIBRESSL_VERSION_NUMBER)
// Set the client callback for TLSv1.3 PSK
if (mode == QSslSocket::SslClientMode
&& QSslSocket::sslLibraryBuildVersionNumber() >= 0x10101006L) {
diff --git qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
index ed80fc14bd..bad2ee2e41 100644
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols.cpp
@@ -146,10 +146,13 @@ DEFINEFUNC2(int, BN_is_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
DEFINEFUNC(int, EVP_CIPHER_CTX_reset, EVP_CIPHER_CTX *c, c, return 0, return)
DEFINEFUNC(int, EVP_PKEY_up_ref, EVP_PKEY *a, a, return 0, return)
DEFINEFUNC2(EVP_PKEY_CTX *, EVP_PKEY_CTX_new, EVP_PKEY *pkey, pkey, ENGINE *e, e, return nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, EVP_PKEY_param_check, EVP_PKEY_CTX *ctx, ctx, return 0, return)
+#endif
DEFINEFUNC(void, EVP_PKEY_CTX_free, EVP_PKEY_CTX *ctx, ctx, return, return)
DEFINEFUNC(int, EVP_PKEY_base_id, EVP_PKEY *a, a, return NID_undef, return)
DEFINEFUNC(int, RSA_bits, RSA *a, a, return 0, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, DSA_bits, DSA *a, a, return 0, return)
DEFINEFUNC(int, OPENSSL_sk_num, OPENSSL_STACK *a, a, return -1, return)
DEFINEFUNC2(void, OPENSSL_sk_pop_free, OPENSSL_STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
@@ -157,10 +160,20 @@ DEFINEFUNC(OPENSSL_STACK *, OPENSSL_sk_new_null, DUMMYARG, DUMMYARG, return null
DEFINEFUNC2(void, OPENSSL_sk_push, OPENSSL_STACK *a, a, void *b, b, return, DUMMYARG)
DEFINEFUNC(void, OPENSSL_sk_free, OPENSSL_STACK *a, a, return, DUMMYARG)
DEFINEFUNC2(void *, OPENSSL_sk_value, OPENSSL_STACK *a, a, int b, b, return nullptr, return)
+#else
+DEFINEFUNC(int, sk_num, STACK *a, a, return -1, return)
+DEFINEFUNC2(void, sk_pop_free, STACK *a, a, void (*b)(void*), b, return, DUMMYARG)
+DEFINEFUNC(_STACK *, sk_new_null, DUMMYARG, DUMMYARG, return nullptr, return)
+DEFINEFUNC2(void, sk_push, _STACK *a, a, void *b, b, return, DUMMYARG)
+DEFINEFUNC(void, sk_free, _STACK *a, a, return, DUMMYARG)
+DEFINEFUNC2(void *, sk_value, STACK *a, a, int b, b, return nullptr, return)
+#endif // LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, SSL_session_reused, SSL *a, a, return 0, return)
DEFINEFUNC2(unsigned long, SSL_CTX_set_options, SSL_CTX *ctx, ctx, unsigned long op, op, return 0, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(int, SSL_CTX_get_security_level, const SSL_CTX *ctx, ctx, return -1, return)
DEFINEFUNC2(void, SSL_CTX_set_security_level, SSL_CTX *ctx, ctx, int level, level, return, return)
+#endif
#ifdef TLS1_3_VERSION
DEFINEFUNC2(int, SSL_CTX_set_ciphersuites, SSL_CTX *ctx, ctx, const char *str, str, return 0, return)
DEFINEFUNC2(void, SSL_set_psk_use_session_callback, SSL *ssl, ssl, q_SSL_psk_use_session_cb_func_t callback, callback, return, DUMMYARG)
@@ -184,7 +197,11 @@ DEFINEFUNC2(void, X509_STORE_set_verify_cb, X509_STORE *a, a, X509_STORE_CTX_ver
DEFINEFUNC3(int, X509_STORE_set_ex_data, X509_STORE *a, a, int idx, idx, void *data, data, return 0, return)
DEFINEFUNC2(void *, X509_STORE_get_ex_data, X509_STORE *r, r, int idx, idx, return nullptr, return)
DEFINEFUNC(STACK_OF(X509) *, X509_STORE_CTX_get0_chain, X509_STORE_CTX *a, a, return nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC3(void, CRYPTO_free, void *str, str, const char *file, file, int line, line, return, DUMMYARG)
+#else
+DEFINEFUNC(void, CRYPTO_free, void *a, a, return, DUMMYARG)
+#endif
DEFINEFUNC(long, OpenSSL_version_num, void, DUMMYARG, return 0, return)
DEFINEFUNC(const char *, OpenSSL_version, int a, a, return nullptr, return)
DEFINEFUNC(unsigned long, SSL_SESSION_get_ticket_lifetime_hint, const SSL_SESSION *session, session, return 0, return)
@@ -224,7 +241,9 @@ DEFINEFUNC5(int, OCSP_id_get0_info, ASN1_OCTET_STRING **piNameHash, piNameHash,
ASN1_OCTET_STRING **piKeyHash, piKeyHash, ASN1_INTEGER **pserial, pserial, OCSP_CERTID *cid, cid,
return 0, return)
DEFINEFUNC2(OCSP_RESPONSE *, OCSP_response_create, int status, status, OCSP_BASICRESP *bs, bs, return nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(const STACK_OF(X509) *, OCSP_resp_get0_certs, const OCSP_BASICRESP *bs, bs, return nullptr, return)
+#endif
DEFINEFUNC2(int, OCSP_id_cmp, OCSP_CERTID *a, a, OCSP_CERTID *b, b, return -1, return)
DEFINEFUNC7(OCSP_SINGLERESP *, OCSP_basic_add1_status, OCSP_BASICRESP *r, r, OCSP_CERTID *c, c, int s, s,
int re, re, ASN1_TIME *rt, rt, ASN1_TIME *t, t, ASN1_TIME *n, n, return nullptr, return)
@@ -269,7 +288,7 @@ DEFINEFUNC2(int, EVP_CIPHER_CTX_set_key_length, EVP_CIPHER_CTX *ctx, ctx, int ke
DEFINEFUNC5(int, EVP_CipherInit, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *type, type, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
DEFINEFUNC6(int, EVP_CipherInit_ex, EVP_CIPHER_CTX *ctx, ctx, const EVP_CIPHER *cipher, cipher, ENGINE *impl, impl, const unsigned char *key, key, const unsigned char *iv, iv, int enc, enc, return 0, return)
DEFINEFUNC5(int, EVP_CipherUpdate, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, const unsigned char *in, in, int inl, inl, return 0, return)
-DEFINEFUNC3(int, EVP_CipherFinal, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, return 0, return)
+DEFINEFUNC3(int, EVP_CipherFinal_ex, EVP_CIPHER_CTX *ctx, ctx, unsigned char *out, out, int *outl, outl, return 0, return)
DEFINEFUNC(const EVP_MD *, EVP_get_digestbyname, const char *name, name, return nullptr, return)
#ifndef OPENSSL_NO_DES
DEFINEFUNC(const EVP_CIPHER *, EVP_des_cbc, DUMMYARG, DUMMYARG, return nullptr, return)
@@ -356,12 +375,14 @@ 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 nullptr, return)
+#ifndef LIBRESSL_VERSION_NUMBER
DEFINEFUNC(SSL_CONF_CTX *, SSL_CONF_CTX_new, DUMMYARG, DUMMYARG, return nullptr, 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);
DEFINEFUNC2(unsigned int, SSL_CONF_CTX_set_flags, SSL_CONF_CTX *a, a, unsigned int b, b, return 0, return);
DEFINEFUNC(int, SSL_CONF_CTX_finish, SSL_CONF_CTX *a, a, return 0, return);
DEFINEFUNC3(int, SSL_CONF_cmd, SSL_CONF_CTX *a, a, const char *b, b, const char *c, c, return 0, return);
+#endif
DEFINEFUNC(void, SSL_free, SSL *a, a, return, DUMMYARG)
DEFINEFUNC(STACK_OF(SSL_CIPHER) *, SSL_get_ciphers, const SSL *a, a, return nullptr, return)
DEFINEFUNC(const SSL_CIPHER *, SSL_get_current_cipher, SSL *a, a, return nullptr, return)
@@ -846,20 +867,26 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_CIPHER_CTX_reset)
RESOLVEFUNC(EVP_PKEY_up_ref)
RESOLVEFUNC(EVP_PKEY_CTX_new)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(EVP_PKEY_param_check)
+#endif
RESOLVEFUNC(EVP_PKEY_CTX_free)
RESOLVEFUNC(EVP_PKEY_base_id)
RESOLVEFUNC(RSA_bits)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(OPENSSL_sk_new_null)
RESOLVEFUNC(OPENSSL_sk_push)
RESOLVEFUNC(OPENSSL_sk_free)
RESOLVEFUNC(OPENSSL_sk_num)
RESOLVEFUNC(OPENSSL_sk_pop_free)
RESOLVEFUNC(OPENSSL_sk_value)
+#endif
RESOLVEFUNC(DH_get0_pqg)
RESOLVEFUNC(SSL_CTX_set_options)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(SSL_CTX_get_security_level)
RESOLVEFUNC(SSL_CTX_set_security_level)
+#endif
#ifdef TLS1_3_VERSION
RESOLVEFUNC(SSL_CTX_set_ciphersuites)
RESOLVEFUNC(SSL_set_psk_use_session_callback)
@@ -898,7 +925,9 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_SESSION_get_ticket_lifetime_hint)
RESOLVEFUNC(DH_bits)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(DSA_bits)
+#endif
#if QT_CONFIG(dtls)
RESOLVEFUNC(DTLSv1_listen)
@@ -928,7 +957,9 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(OCSP_check_validity)
RESOLVEFUNC(OCSP_cert_to_id)
RESOLVEFUNC(OCSP_id_get0_info)
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(OCSP_resp_get0_certs)
+#endif
RESOLVEFUNC(OCSP_basic_sign)
RESOLVEFUNC(OCSP_response_create)
RESOLVEFUNC(i2d_OCSP_RESPONSE)
@@ -979,7 +1010,7 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(EVP_CipherInit)
RESOLVEFUNC(EVP_CipherInit_ex)
RESOLVEFUNC(EVP_CipherUpdate)
- RESOLVEFUNC(EVP_CipherFinal)
+ RESOLVEFUNC(EVP_CipherFinal_ex)
RESOLVEFUNC(EVP_get_digestbyname)
#ifndef OPENSSL_NO_DES
RESOLVEFUNC(EVP_des_cbc)
@@ -1058,12 +1089,14 @@ bool q_resolveOpenSslSymbols()
RESOLVEFUNC(SSL_CTX_use_RSAPrivateKey)
RESOLVEFUNC(SSL_CTX_use_PrivateKey_file)
RESOLVEFUNC(SSL_CTX_get_cert_store);
+#ifndef LIBRESSL_VERSION_NUMBER
RESOLVEFUNC(SSL_CONF_CTX_new);
RESOLVEFUNC(SSL_CONF_CTX_free);
RESOLVEFUNC(SSL_CONF_CTX_set_ssl_ctx);
RESOLVEFUNC(SSL_CONF_CTX_set_flags);
RESOLVEFUNC(SSL_CONF_CTX_finish);
RESOLVEFUNC(SSL_CONF_cmd);
+#endif
RESOLVEFUNC(SSL_accept)
RESOLVEFUNC(SSL_clear)
RESOLVEFUNC(SSL_connect)
diff --git qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h
index c46afcf53e..3945bada5f 100644
--- qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h
+++ qtbase/src/network/ssl/qsslsocket_openssl_symbols_p.h
@@ -80,6 +80,13 @@ QT_BEGIN_NAMESPACE
#define DUMMYARG
+#ifdef LIBRESSL_VERSION_NUMBER
+typedef _STACK STACK;
+typedef STACK OPENSSL_STACK;
+typedef void OPENSSL_INIT_SETTINGS;
+typedef int (*X509_STORE_CTX_verify_cb)(int ok,X509_STORE_CTX *ctx);
+#endif
+
#if !defined QT_LINKED_OPENSSL
// **************** Shared declarations ******************
// ret func(arg)
@@ -230,7 +237,11 @@ const unsigned char * q_ASN1_STRING_get0_data(const ASN1_STRING *x);
Q_AUTOTEST_EXPORT BIO *q_BIO_new(const BIO_METHOD *a);
Q_AUTOTEST_EXPORT const BIO_METHOD *q_BIO_s_mem();
+#ifndef LIBRESSL_VERSION_NUMBER
int q_DSA_bits(DSA *a);
+#else
+#define q_DSA_bits(dsa) q_BN_num_bits((dsa)->p)
+#endif
int q_EVP_CIPHER_CTX_reset(EVP_CIPHER_CTX *c);
Q_AUTOTEST_EXPORT int q_EVP_PKEY_up_ref(EVP_PKEY *a);
EVP_PKEY_CTX *q_EVP_PKEY_CTX_new(EVP_PKEY *pkey, ENGINE *e);
@@ -238,12 +249,29 @@ void q_EVP_PKEY_CTX_free(EVP_PKEY_CTX *ctx);
int q_EVP_PKEY_param_check(EVP_PKEY_CTX *ctx);
int q_EVP_PKEY_base_id(EVP_PKEY *a);
int q_RSA_bits(RSA *a);
+
+#ifndef LIBRESSL_VERSION_NUMBER
Q_AUTOTEST_EXPORT int q_OPENSSL_sk_num(OPENSSL_STACK *a);
Q_AUTOTEST_EXPORT void q_OPENSSL_sk_pop_free(OPENSSL_STACK *a, void (*b)(void *));
Q_AUTOTEST_EXPORT OPENSSL_STACK *q_OPENSSL_sk_new_null();
Q_AUTOTEST_EXPORT void q_OPENSSL_sk_push(OPENSSL_STACK *st, void *data);
Q_AUTOTEST_EXPORT void q_OPENSSL_sk_free(OPENSSL_STACK *a);
Q_AUTOTEST_EXPORT void * q_OPENSSL_sk_value(OPENSSL_STACK *a, int b);
+#else // LIBRESSL_VERSION_NUMBER
+int q_sk_num(STACK *a);
+#define q_OPENSSL_sk_num(a) q_sk_num(a)
+void q_sk_pop_free(STACK *a, void (*b)(void *));
+#define q_OPENSSL_sk_pop_free(a, b) q_sk_pop_free(a, b)
+STACK *q_sk_new_null();
+#define q_OPENSSL_sk_new_null() q_sk_new_null()
+void q_sk_push(STACK *st, void *data);
+#define q_OPENSSL_sk_push(st, data) q_sk_push(st, data)
+void q_sk_free(STACK *a);
+#define q_OPENSSL_sk_free q_sk_free
+void *q_sk_value(STACK *a, int b);
+#define q_OPENSSL_sk_value(a, b) q_sk_value(a, b)
+#endif // LIBRESSL_VERSION_NUMBER
+
int q_SSL_session_reused(SSL *a);
unsigned long q_SSL_CTX_set_options(SSL_CTX *ctx, unsigned long op);
int q_OPENSSL_init_ssl(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
@@ -269,8 +297,13 @@ int q_DH_bits(DH *dh);
# define q_SSL_load_error_strings() q_OPENSSL_init_ssl(OPENSSL_INIT_LOAD_SSL_STRINGS \
| OPENSSL_INIT_LOAD_CRYPTO_STRINGS, NULL)
+#ifndef LIBRESSL_VERSION_NUMBER
#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_OPENSSL_sk_num)(st)
#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_OPENSSL_sk_value)(st, i)
+#else
+#define q_SKM_sk_num(type, st) ((int (*)(const STACK_OF(type) *))q_sk_num)(st)
+#define q_SKM_sk_value(type, st,i) ((type * (*)(const STACK_OF(type) *, int))q_sk_value)(st, i)
+#endif // LIBRESSL_VERSION_NUMBER
#define q_OPENSSL_add_all_algorithms_conf() q_OPENSSL_init_crypto(OPENSSL_INIT_ADD_ALL_CIPHERS \
| OPENSSL_INIT_ADD_ALL_DIGESTS \
@@ -279,7 +312,11 @@ int q_DH_bits(DH *dh);
| OPENSSL_INIT_ADD_ALL_DIGESTS, NULL)
int q_OPENSSL_init_crypto(uint64_t opts, const OPENSSL_INIT_SETTINGS *settings);
+#ifndef LIBRESSL_VERSION_NUMBER
void q_CRYPTO_free(void *str, const char *file, int line);
+#else
+void q_CRYPTO_free(void *a);
+#endif
long q_OpenSSL_version_num();
const char *q_OpenSSL_version(int type);
@@ -395,7 +432,7 @@ int q_EVP_CIPHER_CTX_set_key_length(EVP_CIPHER_CTX *x, int keylen);
int q_EVP_CipherInit(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *type, const unsigned char *key, const unsigned char *iv, int enc);
int q_EVP_CipherInit_ex(EVP_CIPHER_CTX *ctx, const EVP_CIPHER *cipher, ENGINE *impl, const unsigned char *key, const unsigned char *iv, int enc);
int q_EVP_CipherUpdate(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl, const unsigned char *in, int inl);
-int q_EVP_CipherFinal(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
+int q_EVP_CipherFinal_ex(EVP_CIPHER_CTX *ctx, unsigned char *out, int *outl);
const EVP_MD *q_EVP_get_digestbyname(const char *name);
#ifndef OPENSSL_NO_DES
@@ -497,12 +534,14 @@ 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);
+#ifndef 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);
unsigned int q_SSL_CONF_CTX_set_flags(SSL_CONF_CTX *a, unsigned int b);
int q_SSL_CONF_CTX_finish(SSL_CONF_CTX *a);
int q_SSL_CONF_cmd(SSL_CONF_CTX *a, const char *b, const char *c);
+#endif
void q_SSL_free(SSL *a);
STACK_OF(SSL_CIPHER) *q_SSL_get_ciphers(const SSL *a);
const SSL_CIPHER *q_SSL_get_current_cipher(SSL *a);
@@ -728,7 +767,11 @@ int q_OCSP_check_validity(ASN1_GENERALIZEDTIME *thisupd, ASN1_GENERALIZEDTIME *n
int q_OCSP_id_get0_info(ASN1_OCTET_STRING **piNameHash, ASN1_OBJECT **pmd, ASN1_OCTET_STRING **pikeyHash,
ASN1_INTEGER **pserial, OCSP_CERTID *cid);
+#ifndef LIBRESSL_VERSION_NUMBER
const STACK_OF(X509) *q_OCSP_resp_get0_certs(const OCSP_BASICRESP *bs);
+#else
+#define q_OCSP_resp_get0_certs(bs) ((bs)->certs)
+#endif
Q_AUTOTEST_EXPORT OCSP_CERTID *q_OCSP_cert_to_id(const EVP_MD *dgst, X509 *subject, X509 *issuer);
Q_AUTOTEST_EXPORT void q_OCSP_CERTID_free(OCSP_CERTID *cid);
int q_OCSP_id_cmp(OCSP_CERTID *a, OCSP_CERTID *b);
--
2.29.2

View file

@ -1,7 +1,7 @@
# Template file for 'qt5'
pkgname=qt5
version=5.15.2
revision=2
revision=3
wrksrc="qt-everywhere-src-${version}"
build_style=meta
hostmakedepends="cmake clang flex perl glib-devel pkg-config
@ -12,7 +12,7 @@ makedepends="SDL2-devel Vulkan-Headers alsa-lib-devel double-conversion-devel
libinput-devel libmng-devel libmariadbclient-devel libproxy-devel
libvpx-devel libwebp-devel libxslt-devel cups-devel minizip-devel
opus-devel pciutils-devel pcre2-devel postgresql-libs-devel
protobuf-devel pulseaudio-devel tslib-devel libressl-devel
protobuf-devel pulseaudio-devel tslib-devel openssl-devel
unixodbc-devel xcb-util-image-devel xcb-util-keysyms-devel
xcb-util-renderutil-devel xcb-util-wm-devel libzstd-devel harfbuzz-devel"
depends="qt5-dbus qt5-gui qt5-core qt5-widgets qt5-network qt5-xml
@ -28,9 +28,7 @@ replaces="qt5-doc<5.6.0 qt5-quick1<5.6.0 qt5-quick1-devel<5.6.0 qt5-webkit<5.6.0
qt5-enginio<5.7.1 qt5-enginio-devel<5.7.1 qt5-plugin-gtk<5.7.1 qt5-canvas3d<5.13.0"
lib32mode=full
# Work around SSLv3_{client,server}_method missing in libressl-2.3.3
CFLAGS="-DOPENSSL_NO_PSK -DOPENSSL_NO_NEXTPROTONEG"
CXXFLAGS="${CFLAGS} -Wno-deprecated-declarations -Wno-class-memaccess -Wno-packed-not-aligned"
CXXFLAGS="-Wno-deprecated-declarations -Wno-class-memaccess -Wno-packed-not-aligned"
# Required for musl libc
LDFLAGS="-pthread -ldl -fPIE -Wl,-z,stack-size=2097152"
@ -1059,7 +1057,7 @@ qt5-tools_package() {
}
qt5-devel_package() {
depends="zlib-devel libressl-devel>=2.1.4 libXext-devel libXrender-devel
depends="zlib-devel openssl-devel libXext-devel libXrender-devel
fontconfig-devel libglib-devel MesaLib-devel mtdev-devel
dbus-devel icu-devel cups-devel
qt5-gui-${version}_${revision}