[packages/qt5-qtopcua] - new

qboosh qboosh at pld-linux.org
Mon Jul 4 23:01:21 CEST 2022


commit ce5c9676ea5bb9a79d65dd1fd8a3cc714bb1bbcc
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Mon Jul 4 23:02:55 2022 +0200

    - new

 qt5-qtopcua.spec        | 223 ++++++++++++++++++++++++++++++++++++++++++++++++
 qtopcua-open62541.patch | 178 ++++++++++++++++++++++++++++++++++++++
 qtopcua-openssl.patch   |  51 +++++++++++
 3 files changed, 452 insertions(+)
---
diff --git a/qt5-qtopcua.spec b/qt5-qtopcua.spec
new file mode 100644
index 0000000..ea2f437
--- /dev/null
+++ b/qt5-qtopcua.spec
@@ -0,0 +1,223 @@
+#
+# Conditional build:
+%bcond_without	doc	# Documentation
+
+%define		orgname		qtopcua
+%define		qtbase_ver		%{version}
+%define		qtdeclarative_ver	%{version}
+%define		qttools_ver		%{version}
+Summary:	The Qt5 OpcUa library
+Summary(pl.UTF-8):	Biblioteka Qt5 OpcUa
+Name:		qt5-%{orgname}
+Version:	5.15.5
+Release:	1
+License:	GPL v3+ or commercial
+Group:		Libraries
+Source0:	https://download.qt.io/official_releases/qt/5.15/%{version}/submodules/%{orgname}-everywhere-opensource-src-%{version}.tar.xz
+# Source0-md5:	e30b347bee98691c9b9301bc848890e5
+Patch0:		%{orgname}-openssl.patch
+Patch1:		%{orgname}-open62541.patch
+URL:		https://www.qt.io/
+BuildRequires:	Qt5Core-devel >= %{qtbase_ver}
+BuildRequires:	Qt5Gui-devel >= %{qtdeclarative_ver}
+BuildRequires:	Qt5Network-devel >= %{qtbase_ver}
+BuildRequires:	Qt5Qml-devel >= %{qtbase_ver}
+%if %{with doc}
+BuildRequires:	qt5-assistant >= %{qttools_ver}
+%endif
+BuildRequires:	qt5-build >= %{qtbase_ver}
+BuildRequires:	qt5-qmake >= %{qtbase_ver}
+BuildRequires:	libstdc++-devel >= 6:4.7
+BuildRequires:	open62541-devel >= 0.3.1
+BuildRequires:	openssl-devel
+BuildRequires:	rpm-build >= 4.6
+BuildRequires:	rpmbuild(macros) >= 2.016
+BuildRequires:	tar >= 1:1.22
+BuildRequires:	xz
+BuildRequires:	zlib-devel
+Requires:	open62541 >= 0.3.1
+BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%define		specflags	-fno-strict-aliasing
+%define		qt5dir		%{_libdir}/qt5
+
+%description
+Qt is a cross-platform application and UI framework. Using Qt, you can
+write web-enabled applications once and deploy them across desktop,
+mobile and embedded systems without rewriting the source code.
+
+This package contains Qt5 OpcUa library.
+
+%description -l pl.UTF-8
+Qt to wieloplatformowy szkielet aplikacji i interfejsów użytkownika.
+Przy użyciu Qt można pisać aplikacje powiązane z WWW i wdrażać je w
+systemach biurkowych, przenośnych i wbudowanych bez przepisywania kodu
+źródłowego.
+
+Ten pakiet zawiera bibliotekę Qt5 OpcUa.
+
+%package -n Qt5OpcUa
+Summary:	The Qt5 OpcUa library
+Summary(pl.UTF-8):	Biblioteka Qt5 OpcUa
+Group:		Libraries
+Requires:	Qt5Core >= %{qtbase_ver}
+Requires:	Qt5Network >= %{qtbase_ver}
+
+%description -n Qt5OpcUa
+Qt OpcUa module implements OPC UA connectivity through a Qt API.
+
+%description -n Qt5OpcUa -l pl.UTF-8
+Moduł Qt OpcUa implementuje łączność OPC UA poprzez API Qt.
+
+%package -n Qt5OpcUa-devel
+Summary:	Qt5 OpcUa library - development files
+Summary(pl.UTF-8):	Biblioteka Qt5 OpcUa - pliki programistyczne
+Group:		Development/Libraries
+Requires:	Qt5OpcUa = %{version}-%{release}
+Requires:	Qt5Core-devel >= %{qtbase_ver}
+Requires:	Qt5Network-devel >= %{qtbase_ver}
+
+%description -n Qt5OpcUa-devel
+Qt5 OpcUa library - development files.
+
+%description -n Qt5OpcUa-devel -l pl.UTF-8
+Biblioteka Qt5 OpcUa - pliki programistyczne.
+
+%package doc
+Summary:	Qt5 OpcUa documentation in HTML format
+Summary(pl.UTF-8):	Dokumentacja do biblioteki Qt5 OpcUa w formacie HTML
+License:	FDL v1.3
+Group:		Documentation
+Requires:	qt5-doc-common >= %{qtbase_ver}
+BuildArch:	noarch
+
+%description doc
+Qt5 OpcUa documentation in HTML format.
+
+%description doc -l pl.UTF-8
+Dokumentacja do biblioteki Qt5 OpcUa w formacie HTML.
+
+%package doc-qch
+Summary:	Qt5 OpcUa documentation in QCH format
+Summary(pl.UTF-8):	Dokumentacja do biblioteki Qt5 OpcUa w formacie QCH
+License:	FDL v1.3
+Group:		Documentation
+Requires:	qt5-doc-common >= %{qtbase_ver}
+BuildArch:	noarch
+
+%description doc-qch
+Qt5 OpcUa documentation in QCH format.
+
+%description doc-qch -l pl.UTF-8
+Dokumentacja do biblioteki Qt5 OpcUa w formacie QCH.
+
+%package examples
+Summary:	Qt5 OpcUa examples
+Summary(pl.UTF-8):	Przykłady do biblioteki Qt5 OpcUa
+License:	BSD or commercial
+Group:		Development/Libraries
+BuildArch:	noarch
+
+%description examples
+Qt5 OpcUa examples.
+
+%description examples -l pl.UTF-8
+Przykłady do biblioteki Qt5 OpcUa.
+
+%prep
+%setup -q -n %{orgname}-everywhere-src-%{version}
+%patch0 -p1
+%patch1 -p1
+
+%build
+%{qmake_qt5} -- \
+	-system-open62541
+%{__make}
+%{?with_doc:%{__make} docs}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+%{__make} install \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+
+%if %{with doc}
+%{__make} install_docs \
+	INSTALL_ROOT=$RPM_BUILD_ROOT
+%endif
+
+# useless symlinks
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.so.5.??
+# actually drop *.la, follow policy of not packaging them when *.pc exist
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libQt5*.la
+
+# Prepare some files list
+ifecho() {
+	r="$RPM_BUILD_ROOT$2"
+	if [ -d "$r" ]; then
+		echo "%%dir $2" >> $1.files
+	elif [ -x "$r" ] ; then
+		echo "%%attr(755,root,root) $2" >> $1.files
+	elif [ -f "$r" ]; then
+		echo "$2" >> $1.files
+	else
+		echo "Error generation $1 files list!"
+		echo "$r: no such file or directory!"
+		return 1
+	fi
+}
+ifecho_tree() {
+	ifecho $1 $2
+	for f in `find $RPM_BUILD_ROOT$2 -printf "%%P "`; do
+		ifecho $1 $2/$f
+	done
+}
+
+echo "%defattr(644,root,root,755)" > examples.files
+ifecho_tree examples %{_examplesdir}/qt5/opcua
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%post	-n Qt5OpcUa -p /sbin/ldconfig
+%postun	-n Qt5OpcUa -p /sbin/ldconfig
+
+%files -n Qt5OpcUa
+%defattr(644,root,root,755)
+%doc LICENSE.GPL3-EXCEPT dist/changes-*
+# R: Qt5Core Qt5Network openssl
+%attr(755,root,root) %{_libdir}/libQt5OpcUa.so.*.*.*
+%attr(755,root,root) %ghost %{_libdir}/libQt5OpcUa.so.5
+%dir %{qt5dir}/plugins/opcua
+# R: Qt5Core Qt5OpcUa open62541
+%attr(755,root,root) %{qt5dir}/plugins/opcua/libopen62541_backend.so
+# R: Qt5Core Qt5Gui Qt5OpcUa Qt5Qml
+%dir %{qt5dir}/qml/QtOpcUa
+%attr(755,root,root) %{qt5dir}/qml/QtOpcUa/libdeclarative_opcua.so
+%{qt5dir}/qml/QtOpcUa/plugins.qmltypes
+%{qt5dir}/qml/QtOpcUa/qmldir
+
+%files -n Qt5OpcUa-devel
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_libdir}/libQt5OpcUa.so
+%{_libdir}/libQt5OpcUa.prl
+%{_includedir}/qt5/QtOpcUa
+%{_pkgconfigdir}/Qt5OpcUa.pc
+%{_libdir}/cmake/Qt5OpcUa
+%{qt5dir}/mkspecs/modules/qt_lib_opcua.pri
+%{qt5dir}/mkspecs/modules/qt_lib_opcua_private.pri
+
+%if %{with doc}
+%files doc
+%defattr(644,root,root,755)
+%{_docdir}/qt5-doc/qtopcua
+
+%files doc-qch
+%defattr(644,root,root,755)
+%{_docdir}/qt5-doc/qtopcua.qch
+%endif
+
+%files examples -f examples.files
+%defattr(644,root,root,755)
+# XXX: dir shared with qt5-qtbase-examples
+%dir %{_examplesdir}/qt5
diff --git a/qtopcua-open62541.patch b/qtopcua-open62541.patch
new file mode 100644
index 0000000..a54fde9
--- /dev/null
+++ b/qtopcua-open62541.patch
@@ -0,0 +1,178 @@
+--- qtopcua-everywhere-src-5.15.5/config.tests/open62541/main.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/config.tests/open62541/main.cpp	2022-07-03 17:37:30.955379477 +0200
+@@ -35,7 +35,12 @@
+ ****************************************************************************/
+ 
+ #include <stdio.h>
+-#include "open62541.h"
++#include <open62541/client.h>
++#include <open62541/client_config_default.h>
++#include <open62541/client_highlevel.h>
++#include <open62541/types.h>
++#include <open62541/types_generated_handling.h>
++#include <open62541/util.h>
+ 
+ int main(int argc, char *argv[])
+ {
+--- qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541.h.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541.h	2022-07-04 17:42:51.130645159 +0200
+@@ -49,7 +49,11 @@
+ #pragma clang diagnostic ignored "-Wunused-parameter"
+ #endif
+ 
+-#include <open62541.h>
++#include <open62541/client.h>
++#include <open62541/types.h>
++#include <open62541/types_generated.h>
++#include <open62541/types_generated_handling.h>
++#include <open62541/util.h>
+ 
+ #if defined(_MSC_VER)
+ #pragma warning(pop)
+--- qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541backend.h.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541backend.h	2022-07-04 18:34:39.120149437 +0200
+@@ -94,7 +94,7 @@ public:
+     const double m_maximumIterateInterval;
+ 
+ private:
+-    static void clientStateCallback(UA_Client *client, UA_ClientState state);
++    static void clientStateCallback(UA_Client *client, UA_SecureChannelState channelState, UA_SessionState sessionState, UA_StatusCode connectStatus);
+ 
+     QOpen62541Subscription *getSubscriptionForItem(quint64 handle, QOpcUa::NodeAttribute attr);
+     QOpcUaApplicationDescription convertApplicationDescription(UA_ApplicationDescription &desc);
+--- qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541backend.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541backend.cpp	2022-07-04 18:37:32.872615124 +0200
+@@ -43,6 +43,9 @@
+ #include "qopcuaauthenticationinformation.h"
+ #include <qopcuaerrorstate.h>
+ 
++#include <open62541/client_config_default.h>
++#include <open62541/client_highlevel.h>
++
+ #include <QtCore/QDir>
+ #include <QtCore/QFile>
+ #include <QtCore/qloggingcategory.h>
+@@ -754,13 +757,13 @@ void Open62541AsyncBackend::browse(quint
+     emit browseFinished(handle, ret, statusCode);
+ }
+ 
+-void Open62541AsyncBackend::clientStateCallback(UA_Client *client, UA_ClientState state)
++void Open62541AsyncBackend::clientStateCallback(UA_Client *client, UA_SecureChannelState channelState, UA_SessionState sessionState, UA_StatusCode connectStatus)
+ {
+     Open62541AsyncBackend *backend = static_cast<Open62541AsyncBackend *>(UA_Client_getContext(client));
+     if (!backend || !backend->m_useStateCallback)
+         return;
+ 
+-    if (state == UA_CLIENTSTATE_DISCONNECTED) {
++    if (sessionState == UA_SESSIONSTATE_CLOSED) {
+         emit backend->stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::ConnectionError);
+         backend->m_useStateCallback = false;
+         // Use a queued connection to make sure the subscription is not deleted if the callback was triggered
+@@ -910,7 +913,7 @@ void Open62541AsyncBackend::connectToEnd
+         }
+ 
+         const auto credentials = authInfo.authenticationData().value<QPair<QString, QString>>();
+-        ret = UA_Client_connect_username(m_uaclient, endpoint.endpointUrl().toUtf8().constData(),
++        ret = UA_Client_connectUsername(m_uaclient, endpoint.endpointUrl().toUtf8().constData(),
+                                          credentials.first.toUtf8().constData(), credentials.second.toUtf8().constData());
+     } else {
+         emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::UnsupportedAuthenticationInformation);
+--- qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541subscription.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541subscription.cpp	2022-07-04 18:50:23.235473426 +0200
+@@ -50,6 +50,8 @@
+ 
+ #include <QtCore/qloggingcategory.h>
+ 
++#include <open62541/client_subscriptions.h>
++
+ QT_BEGIN_NAMESPACE
+ 
+ Q_DECLARE_LOGGING_CATEGORY(QT_OPCUA_PLUGINS_OPEN62541)
+--- qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541valueconverter.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/plugins/opcua/open62541/qopen62541valueconverter.cpp	2022-07-04 22:09:49.278798206 +0200
+@@ -155,57 +155,59 @@ QVariant toQVariant(const UA_Variant &va
+         return QVariant();
+     }
+ 
+-    switch (value.type->typeIndex) {
+-    case UA_TYPES_BOOLEAN:
++    switch (value.type->typeKind) {
++    case UA_DATATYPEKIND_BOOLEAN:
+         return arrayToQVariant<bool, UA_Boolean>(value, QMetaType::Bool);
+-    case UA_TYPES_SBYTE:
++    case UA_DATATYPEKIND_SBYTE:
+         return arrayToQVariant<signed char, UA_SByte>(value, QMetaType::SChar);
+-    case UA_TYPES_BYTE:
++    case UA_DATATYPEKIND_BYTE:
+         return arrayToQVariant<uchar, UA_Byte>(value, QMetaType::UChar);
+-    case UA_TYPES_INT16:
++    case UA_DATATYPEKIND_INT16:
+         return arrayToQVariant<qint16, UA_Int16>(value, QMetaType::Short);
+-    case UA_TYPES_UINT16:
++    case UA_DATATYPEKIND_UINT16:
+         return arrayToQVariant<quint16, UA_UInt16>(value, QMetaType::UShort);
+-    case UA_TYPES_INT32:
++    case UA_DATATYPEKIND_INT32:
+         return arrayToQVariant<qint32, UA_Int32>(value, QMetaType::Int);
+-    case UA_TYPES_UINT32:
++    case UA_DATATYPEKIND_UINT32:
+         return arrayToQVariant<quint32, UA_UInt32>(value, QMetaType::UInt);
+-    case UA_TYPES_INT64:
++    case UA_DATATYPEKIND_INT64:
+         return arrayToQVariant<int64_t, UA_Int64>(value, QMetaType::LongLong);
+-    case UA_TYPES_UINT64:
++    case UA_DATATYPEKIND_UINT64:
+         return arrayToQVariant<uint64_t, UA_UInt64>(value, QMetaType::ULongLong);
+-    case UA_TYPES_FLOAT:
++    case UA_DATATYPEKIND_FLOAT:
+         return arrayToQVariant<float, UA_Float>(value, QMetaType::Float);
+-    case UA_TYPES_DOUBLE:
++    case UA_DATATYPEKIND_DOUBLE:
+         return arrayToQVariant<double, UA_Double>(value, QMetaType::Double);
+-    case UA_TYPES_STRING:
++    case UA_DATATYPEKIND_STRING:
+         return arrayToQVariant<QString, UA_String>(value, QMetaType::QString);
+-    case UA_TYPES_BYTESTRING:
++    case UA_DATATYPEKIND_BYTESTRING:
+         return arrayToQVariant<QByteArray, UA_ByteString>(value, QMetaType::QByteArray);
+-    case UA_TYPES_LOCALIZEDTEXT:
++    case UA_DATATYPEKIND_LOCALIZEDTEXT:
+         return arrayToQVariant<QOpcUaLocalizedText, UA_LocalizedText>(value);
+-    case UA_TYPES_NODEID:
++    case UA_DATATYPEKIND_NODEID:
+         return arrayToQVariant<QString, UA_NodeId>(value, QMetaType::QString);
+-    case UA_TYPES_DATETIME:
++    case UA_DATATYPEKIND_DATETIME:
+         return arrayToQVariant<QDateTime, UA_DateTime>(value, QMetaType::QDateTime);
+-    case UA_TYPES_GUID:
++    case UA_DATATYPEKIND_GUID:
+         return arrayToQVariant<QUuid, UA_Guid>(value, QMetaType::QUuid);
+-    case UA_TYPES_XMLELEMENT:
++    case UA_DATATYPEKIND_XMLELEMENT:
+         return arrayToQVariant<QString, UA_XmlElement>(value, QMetaType::QString);
+-    case UA_TYPES_QUALIFIEDNAME:
++    case UA_DATATYPEKIND_QUALIFIEDNAME:
+         return arrayToQVariant<QOpcUaQualifiedName, UA_QualifiedName>(value);
+-    case UA_TYPES_STATUSCODE:
++    case UA_DATATYPEKIND_STATUSCODE:
+         return arrayToQVariant<QOpcUa::UaStatusCode, UA_StatusCode>(value, QMetaType::UInt);
+-    case UA_TYPES_EXTENSIONOBJECT:
++    case UA_DATATYPEKIND_EXTENSIONOBJECT:
+         return arrayToQVariant<QVariant, UA_ExtensionObject>(value);
+-    case UA_TYPES_EXPANDEDNODEID:
++    case UA_DATATYPEKIND_EXPANDEDNODEID:
+         return arrayToQVariant<QOpcUaExpandedNodeId, UA_ExpandedNodeId>(value);
+-    case UA_TYPES_ARGUMENT:
++    case UA_DATATYPEKIND_STRUCTURE:
++	if (!strcmp(value.type->typeName, "Argument"))
+         return arrayToQVariant<QOpcUaArgument, UA_Argument>(value);
+-    case UA_TYPES_RANGE:
++	else if (!strcmp(value.type->typeName, "Range"))
+         return arrayToQVariant<QOpcUaRange, UA_Range>(value);
++	/* fallthrough */
+     default:
+-        qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Variant conversion from Open62541 for typeIndex" << value.type->typeIndex << " not implemented";
++        qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Variant conversion from Open62541 for typeKind" << value.type->typeKind << " not implemented";
+         return QVariant();
+     }
+ }
diff --git a/qtopcua-openssl.patch b/qtopcua-openssl.patch
new file mode 100644
index 0000000..33ddecb
--- /dev/null
+++ b/qtopcua-openssl.patch
@@ -0,0 +1,51 @@
+--- qtopcua-everywhere-src-5.15.5/src/opcua/x509/openssl_symbols.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/opcua/x509/openssl_symbols.cpp	2022-07-03 17:05:49.672346278 +0200
+@@ -273,7 +273,7 @@ DEFINEFUNC3(int, BIO_read, BIO *a, a, vo
+ DEFINEFUNC3(int, BIO_write, BIO *a, a, const void *b, b, int c, c, return -1, return)
+ DEFINEFUNC(int, BN_num_bits, const BIGNUM *a, a, return 0, return)
+ DEFINEFUNC2(BN_ULONG, BN_mod_word, const BIGNUM *a, a, BN_ULONG w, w, return static_cast<BN_ULONG>(-1), return)
+-DEFINEFUNC2(int, BN_set_word, const BIGNUM *a, a, BN_ULONG w, w, return 0, return)
++DEFINEFUNC2(int, BN_set_word, BIGNUM *a, a, BN_ULONG w, w, return 0, return)
+ DEFINEFUNC(BIGNUM *, BN_new, void, DUMMYARG, return nullptr, return)
+ DEFINEFUNC(void, BN_clear, BIGNUM *bignum, bignum, return, return)
+ DEFINEFUNC(void, BN_free, BIGNUM *bignum, bignum, return, return)
+@@ -339,7 +339,7 @@ DEFINEFUNC4(DH *, PEM_read_bio_DHparams,
+ DEFINEFUNC7(int, PEM_write_bio_DSAPrivateKey, BIO *a, a, DSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+ DEFINEFUNC7(int, PEM_write_bio_RSAPrivateKey, BIO *a, a, RSA *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+ DEFINEFUNC7(int, PEM_write_bio_PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+-DEFINEFUNC7(int, PEM_write_bio_PKCS8PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
++DEFINEFUNC7(int, PEM_write_bio_PKCS8PrivateKey, BIO *a, a, EVP_PKEY *b, b, const EVP_CIPHER *c, c, char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+ #ifndef OPENSSL_NO_EC
+ DEFINEFUNC7(int, PEM_write_bio_ECPrivateKey, BIO *a, a, EC_KEY *b, b, const EVP_CIPHER *c, c, unsigned char *d, d, int e, e, pem_password_cb *f, f, void *g, g, return 0, return)
+ #endif
+--- qtopcua-everywhere-src-5.15.5/src/opcua/x509/openssl_symbols_p.h.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/opcua/x509/openssl_symbols_p.h	2022-07-03 17:09:35.181124592 +0200
+@@ -279,7 +279,7 @@ int q_BN_is_word(BIGNUM *a, BN_ULONG w);
+ #endif // !opensslv11
+ 
+ BN_ULONG q_BN_mod_word(const BIGNUM *a, BN_ULONG w);
+-int q_BN_set_word(const BIGNUM *a, BN_ULONG w);
++int q_BN_set_word(BIGNUM *a, BN_ULONG w);
+ BIGNUM *q_BN_new();
+ void q_BN_clear(BIGNUM *a);
+ void q_BN_free(BIGNUM *a);
+@@ -385,7 +385,7 @@ int q_PEM_write_bio_RSAPrivateKey(BIO *a
+                                   int e, pem_password_cb *f, void *g);
+ int q_PEM_write_bio_PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d,
+                                int e, pem_password_cb *f, void *g);
+-int q_PEM_write_bio_PKCS8PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, unsigned char *d,
++int q_PEM_write_bio_PKCS8PrivateKey(BIO *a, EVP_PKEY *b, const EVP_CIPHER *c, char *d,
+                                int e, pem_password_cb *f, void *g);
+ #ifndef OPENSSL_NO_EC
+ int q_PEM_write_bio_ECPrivateKey(BIO *a, EC_KEY *b, const EVP_CIPHER *c, unsigned char *d,
+--- qtopcua-everywhere-src-5.15.5/src/opcua/x509/qopcuakeypair_openssl.cpp.orig	2022-05-16 17:16:46.000000000 +0200
++++ qtopcua-everywhere-src-5.15.5/src/opcua/x509/qopcuakeypair_openssl.cpp	2022-07-03 17:14:46.672770431 +0200
+@@ -240,7 +240,7 @@ QByteArray QOpcUaKeyPairPrivate::private
+     }
+ 
+     if (0 == q_PEM_write_bio_PKCS8PrivateKey(bio, m_keyData, enc,
+-                                         enc ? (unsigned char*)password.toUtf8().constData() : NULL,
++                                         enc ? (char*)password.toUtf8().constData() : NULL,
+                                          enc ? password.length() : 0,
+                                          NULL /* callback */, NULL /* userdata */)) {
+         qCWarning(lcSsl) << "Failed to write private key:" << getOpenSslError();
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/qt5-qtopcua.git/commitdiff/ce5c9676ea5bb9a79d65dd1fd8a3cc714bb1bbcc



More information about the pld-cvs-commit mailing list