Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package qt6-opcua for openSUSE:Factory checked in at 2025-08-29 18:36:04 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/qt6-opcua (Old) and /work/SRC/openSUSE:Factory/.qt6-opcua.new.1977 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "qt6-opcua" Fri Aug 29 18:36:04 2025 rev:37 rq:1301715 version:6.9.2 Changes: -------- --- /work/SRC/openSUSE:Factory/qt6-opcua/qt6-opcua.changes 2025-06-05 20:33:42.271709943 +0200 +++ /work/SRC/openSUSE:Factory/.qt6-opcua.new.1977/qt6-opcua.changes 2025-08-29 18:36:58.130577613 +0200 @@ -1,0 +2,6 @@ +Wed Aug 27 07:15:25 UTC 2025 - Christophe Marin <christo...@krop.fr> + +- Update to 6.9.2: + * https://www.qt.io/blog/qt-6.9.2-released + +------------------------------------------------------------------- Old: ---- qtopcua-everywhere-src-6.9.1.tar.xz New: ---- qtopcua-everywhere-src-6.9.2.tar.xz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ qt6-opcua.spec ++++++ --- /var/tmp/diff_new_pack.SQU5UI/_old 2025-08-29 18:36:58.858608734 +0200 +++ /var/tmp/diff_new_pack.SQU5UI/_new 2025-08-29 18:36:58.858608734 +0200 @@ -1,7 +1,7 @@ # # spec file for package qt6-opcua # -# Copyright (c) 2025 SUSE LLC +# Copyright (c) 2025 SUSE LLC and contributors # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,7 +16,7 @@ # -%define real_version 6.9.1 +%define real_version 6.9.2 %define short_version 6.9 %define tar_name qtopcua-everywhere-src %define tar_suffix %{nil} @@ -30,7 +30,7 @@ %global __requires_exclude qt6qmlimport\\(OpcUaMachineBackend\\) # Name: qt6-opcua%{?pkg_suffix} -Version: 6.9.1 +Version: 6.9.2 Release: 0 Summary: Qt wrapper for existing OPC UA stacks # src/plugins/opcua is GPL-3.0-or-later, rest is dual licensed ++++++ _service ++++++ --- /var/tmp/diff_new_pack.SQU5UI/_old 2025-08-29 18:36:58.902610615 +0200 +++ /var/tmp/diff_new_pack.SQU5UI/_new 2025-08-29 18:36:58.906610786 +0200 @@ -1,9 +1,9 @@ <services> <service name="tar_scm" mode="disabled"> <param name="changesgenerate">disable</param> - <param name="version">6.9.1</param> + <param name="version">6.9.2</param> <param name="url">git://code.qt.io/qt/qtopcua.git</param> - <param name="revision">v6.9.1</param> + <param name="revision">v6.9.2</param> <param name="scm">git</param> <param name="filename">qtopcua-everywhere-src</param> </service> ++++++ qtopcua-everywhere-src-6.9.1.tar.xz -> qtopcua-everywhere-src-6.9.2.tar.xz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/.cmake.conf new/qtopcua-everywhere-src-6.9.2/.cmake.conf --- old/qtopcua-everywhere-src-6.9.1/.cmake.conf 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/.cmake.conf 2025-08-18 01:36:59.000000000 +0200 @@ -1,4 +1,4 @@ -set(QT_REPO_MODULE_VERSION "6.9.1") +set(QT_REPO_MODULE_VERSION "6.9.2") set(QT_REPO_MODULE_PRERELEASE_VERSION_SEGMENT "alpha1") set(QT_EXTRA_INTERNAL_TARGET_DEFINES "QT_LEAN_HEADERS=1") diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/dependencies.yaml new/qtopcua-everywhere-src-6.9.2/dependencies.yaml --- old/qtopcua-everywhere-src-6.9.1/dependencies.yaml 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/dependencies.yaml 2025-08-18 01:36:59.000000000 +0200 @@ -1,7 +1,7 @@ dependencies: ../qtbase: - ref: 2ad23cd72d5f122f88ce95792a4323d639c27d25 + ref: 6f0d27d2e4ba5fa6562f738aaaf8eaf98ebf51e7 required: true ../qtdeclarative: - ref: 1e6adc3d5f1f4cbbb77b41911395782dff43cccd + ref: b653aebb2175203d86199b1d320fd10f939df3fc required: true diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/simulationserver/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/simulationserver/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/simulationserver/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/simulationserver/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -18,11 +18,18 @@ qt_standard_project_setup() -if (EXISTS ../../../../../${Qt6_VERSION}/Src/qtopcua/) - set(MODULE_SOURCE ../../../../../${Qt6_VERSION}/Src/qtopcua/) -else() +if (EXISTS ../../../../../${Qt6_VERSION}/Src/qtopcua/src/plugins/opcua/open62541/qopen62541utils.cpp) + # Installed sources + set(MODULE_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../../${Qt6_VERSION}/Src/qtopcua/) +elseif (EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../../../../src/plugins/opcua/open62541/qopen62541utils.cpp) # Build from source tree - set(MODULE_SOURCE ../../../../) + set(MODULE_SOURCE ${CMAKE_CURRENT_SOURCE_DIR}/../../../../) +elseif (NOT "${QTOPCUA_SOURCE_DIR}" STREQUAL "" AND EXISTS ${QTOPCUA_SOURCE_DIR}/src/plugins/opcua/open62541/qopen62541utils.cpp) + # Build from custom directory + set(MODULE_SOURCE ${QTOPCUA_SOURCE_DIR}) +else() + message(FATAL_ERROR "Unable to build the server, the Qt OPC UA module source is not available." + "Set QTOPCUA_SOURCE_DIR to the location of the Qt OPC UA sources.") endif() qt_add_executable(simulationserver @@ -32,6 +39,9 @@ simulationserver.cpp simulationserver.h ) +set_source_files_properties(${MODULE_SOURCE}/src/plugins/opcua/open62541/qopen62541valueconverter.cpp + PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) + set_target_properties(simulationserver PROPERTIES WIN32_EXECUTABLE FALSE MACOSX_BUNDLE TRUE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/simulationserver/simulationserver.pro new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/simulationserver/simulationserver.pro --- old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/simulationserver/simulationserver.pro 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/simulationserver/simulationserver.pro 2025-08-18 01:36:59.000000000 +0200 @@ -4,17 +4,23 @@ QT -= gui # Installed example package -greaterThan(QT_MAJOR_VERSION, 5) { - MODULE_SOURCES=../../../../../$$QT_VERSION/Src/qtopcua/ -} else { - MODULE_SOURCES=../../../../../$$QT_VERSION/Automation/sources/qtopcua/ -} -!exists($$MODULE_SOURCES):{ +MODULE_SOURCES=../../../../../$$QT_VERSION/Src/qtopcua/ + +!exists($$MODULE_SOURCES/src/plugins/opcua/open62541/qopen62541utils.cpp):{ # Build from source tree MODULE_SOURCES=$$PWD/../../../../ } +!exists($$MODULE_SOURCES/src/plugins/opcua/open62541/qopen62541utils.cpp):{ + # Build from source tree + MODULE_SOURCES=$$QTOPCUA_SOURCE_DIR +} + +!exists($$MODULE_SOURCES/src/plugins/opcua/open62541/qopen62541utils.cpp):{ + error("Unable to build the server, the Qt OPC UA module source is not available. Set QTOPCUA_SOURCE_DIR to the location of the Qt OPC UA sources.") +} + INCLUDEPATH += $$MODULE_SOURCES/src/plugins/opcua/open62541 DEPENDPATH += INCLUDEPATH diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/waterpump-qml/main.cpp new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/waterpump-qml/main.cpp --- old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/waterpump-qml/main.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/waterpump-qml/main.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -21,7 +21,7 @@ #ifdef EXAMPLES_CMAKE_SPECIFIC_PATH serverExePath = app.applicationDirPath() .append("/../simulationserver/simulationserver.exe"); - #elif QT_DEBUG + #elif defined(QT_DEBUG) serverExePath = app.applicationDirPath() .append("/../../simulationserver/debug/simulationserver.exe"); #else diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/waterpump-qmlcpp/main.cpp new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/waterpump-qmlcpp/main.cpp --- old/qtopcua-everywhere-src-6.9.1/examples/opcua/waterpump/waterpump-qmlcpp/main.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/examples/opcua/waterpump/waterpump-qmlcpp/main.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -20,7 +20,7 @@ #ifdef Q_OS_WIN #ifdef EXAMPLES_CMAKE_SPECIFIC_PATH serverExePath = app.applicationDirPath().append("/../simulationserver/simulationserver.exe"); - #elif QT_DEBUG + #elif defined(QT_DEBUG) serverExePath = app.applicationDirPath().append("/../../simulationserver/debug/simulationserver.exe"); #else serverExePath = app.applicationDirPath().append("/../../simulationserver/release/simulationserver.exe"); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/3rdparty/open62541/qt_attribution.json new/qtopcua-everywhere-src-6.9.2/src/3rdparty/open62541/qt_attribution.json --- old/qtopcua-everywhere-src-6.9.1/src/3rdparty/open62541/qt_attribution.json 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/3rdparty/open62541/qt_attribution.json 2025-08-18 01:36:59.000000000 +0200 @@ -5,7 +5,13 @@ "QtUsage": "Used in the Qt OPC UA module to build the backend. Pass -no-open62541 or -system-open62541 to avoid.", "Description": "Open62541 is an open source implementation of the OPC UA protocol.", "Homepage": "https://open62541.org/", - "Version": "v1.4.9", + "PURL": [ + "pkg:github/open62541/open62541@v$<VERSION>" + ], + "CPE": [ + "cpe:2.3:a:open62541:open62541:$<VERSION>:*:*:*:*:*:*:*" + ], + "Version": "1.4.9", "License": "Mozilla Public License 2.0 and Creative Commons Zero v1.0 Universal and Creative Commons Attribution Share Alike 4.0 International and BSD 3-Clause \"New\" or \"Revised\" License and Apache License 2.0 and MIT License", "LicenseId": "MPL-2.0 AND CC0-1.0 AND CC-BY-SA-4.0 AND BSD-3-Clause AND Apache-2.0 AND MIT", "LicenseFiles": [ "mpl-2.0.815ca599c9df.txt", "LICENSE-CC0", "CC-BY-SA-4.0", "BSD-3-CLAUSE", "LICENSE-2.0.txt", "MIT" ], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/declarative_opcua/opcuanodeidtype.cpp new/qtopcua-everywhere-src-6.9.2/src/declarative_opcua/opcuanodeidtype.cpp --- old/qtopcua-everywhere-src-6.9.1/src/declarative_opcua/opcuanodeidtype.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/declarative_opcua/opcuanodeidtype.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -20,10 +20,14 @@ OpcUaNodeIdType::OpcUaNodeIdType(QObject *parent) : QObject(parent) { - connect(&m_universalNode, SIGNAL(namespaceNameChanged(const QString &)), this, SIGNAL(nodeNamespaceChanged(const QString &))); - connect(&m_universalNode, SIGNAL(nodeIdentifierChanged(const QString &)), this, SIGNAL(identifierChanged(const QString &))); - connect(&m_universalNode, SIGNAL(namespaceNameChanged(const QString &)), this, SIGNAL(nodeChanged())); - connect(&m_universalNode, SIGNAL(nodeIdentifierChanged(const QString &)), this, SIGNAL(nodeChanged())); + connect(&m_universalNode, SIGNAL(namespaceNameChanged(QString)), + this, SIGNAL(nodeNamespaceChanged(QString))); + connect(&m_universalNode, SIGNAL(nodeIdentifierChanged(QString)), + this, SIGNAL(identifierChanged(QString))); + connect(&m_universalNode, SIGNAL(namespaceNameChanged(QString)), + this, SIGNAL(nodeChanged())); + connect(&m_universalNode, SIGNAL(nodeIdentifierChanged(QString)), + this, SIGNAL(nodeChanged())); } void OpcUaNodeIdType::setNodeNamespace(const QString &name) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/opcua/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/src/opcua/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/src/opcua/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/opcua/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -100,7 +100,7 @@ CONDITION QT_FEATURE_gds AND QT_FEATURE_openssl AND NOT APPLE AND NOT WINRT SOURCES - client/qopcuagdsclient.cpp client/qopcuagdsclient_p.h + client/qopcuagdsclient.cpp client/qopcuagdsclient.h client/qopcuagdsclient_p.h x509/openssl_symbols.cpp x509/qopcuakeypair.cpp x509/qopcuakeypair.h x509/qopcuakeypair_openssl.cpp diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/opcua/configure.cmake new/qtopcua-everywhere-src-6.9.2/src/opcua/configure.cmake --- old/qtopcua-everywhere-src-6.9.1/src/opcua/configure.cmake 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/opcua/configure.cmake 2025-08-18 01:36:59.000000000 +0200 @@ -57,9 +57,9 @@ AUTODETECT false ) qt_feature("gds" PUBLIC PRIVATE - LABEL "Support for global discovery server" + LABEL "Support for global discovery server (requires OpenSSL 3.x)" PURPOSE "Enables QOpcUaClient to interact with a global discovery server" - CONDITION WrapOpenSSL_FOUND # special case + CONDITION WrapOpenSSL_FOUND AND QT_FEATURE_opensslv30 ) # special case begin qt_feature("open62541-security" PUBLIC PRIVATE diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/opcua/doc/qtopcua.qdocconf new/qtopcua-everywhere-src-6.9.2/src/opcua/doc/qtopcua.qdocconf --- old/qtopcua-everywhere-src-6.9.1/src/opcua/doc/qtopcua.qdocconf 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/opcua/doc/qtopcua.qdocconf 2025-08-18 01:36:59.000000000 +0200 @@ -44,8 +44,6 @@ qhp.QtOpcUa.subprojects.manual.indexTitle = Qt OPC UA module topics qhp.QtOpcUa.subprojects.manual.type = manual -examples.fileextensions = "*.cpp" - navigation.landingpage = "Qt OPC UA" navigation.cppclassespage = "Qt OPC UA C++ Classes" navigation.qmltypespage = "Qt OPC UA QML Types" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -38,8 +38,7 @@ ../../../3rdparty/open62541 ) -set_source_files_properties(QOpen62541Plugin - qopen62541valueconverter.cpp +set_source_files_properties(qopen62541valueconverter.cpp PROPERTIES SKIP_UNITY_BUILD_INCLUSION ON) #qt_internal_extend_target(QOpen62541Plugin CONDITION QT_FEATURE_mbedtls AND QT_FEATURE_open62541 AND NOT QT_FEATURE_system_open62541 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541backend.cpp new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541backend.cpp --- old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541backend.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541backend.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -1176,20 +1176,21 @@ return; } - result = setSecurityPolicyInClientConfig(conf, localCertificate, privateKey, endpoint); + QString usedAuthSecurityPolicy; + result = setAuthSecurityPolicyInClientConfig(conf, localCertificate, privateKey, endpoint, authInfo.authenticationType(), &usedAuthSecurityPolicy); if (result != UA_STATUSCODE_GOOD) { - qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set up security policies:" << static_cast<QOpcUa::UaStatusCode>(result); + qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set up auth security policies:" << static_cast<QOpcUa::UaStatusCode>(result); emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); UA_Client_delete(m_uaclient); m_uaclient = nullptr; return; } - result = setAuthSecurityPolicyInClientConfig(conf, localCertificate, privateKey, endpoint, authInfo.authenticationType()); + result = setSecurityPolicyInClientConfig(conf, localCertificate, privateKey, endpoint, usedAuthSecurityPolicy); if (result != UA_STATUSCODE_GOOD) { - qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set up auth security policies:" << static_cast<QOpcUa::UaStatusCode>(result); + qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to set up security policies:" << static_cast<QOpcUa::UaStatusCode>(result); emit stateAndOrErrorChanged(QOpcUaClient::Disconnected, QOpcUaClient::AccessDenied); UA_Client_delete(m_uaclient); m_uaclient = nullptr; @@ -1324,7 +1325,7 @@ conf->userIdentityToken.content.decoded.data = token; if (result == UA_STATUSCODE_GOOD) - result = setAuthSecurityPolicyInClientConfig(conf, cert, key, endpoint, authInfo.authenticationType()); + result = setAuthSecurityPolicyInClientConfig(conf, cert, key, endpoint, authInfo.authenticationType(), nullptr); if (result != UA_STATUSCODE_GOOD) { qCWarning(QT_OPCUA_PLUGINS_OPEN62541) << "Failed to initialize certificate auth:" << UA_StatusCode_name(result); @@ -2239,32 +2240,46 @@ // Only add the security policy the requested endpoint requires UA_StatusCode Open62541AsyncBackend::setSecurityPolicyInClientConfig(UA_ClientConfig *conf, const UA_ByteString &cert, const UA_ByteString &key, - const QOpcUaEndpointDescription &desc) + const QOpcUaEndpointDescription &desc, const QString &additionalAuthSecurityPolicy) { - // None is already present - if (desc.securityPolicy() == NonePolicy) + QStringList policiesToAdd; + if (desc.securityPolicy() != NonePolicy) + policiesToAdd.push_back(desc.securityPolicy()); + + if (!policiesToAdd.contains(additionalAuthSecurityPolicy)) + policiesToAdd.append(additionalAuthSecurityPolicy); + + if (policiesToAdd.isEmpty()) return UA_STATUSCODE_GOOD; - const size_t numPolicies = conf->securityPoliciesSize + 1; + const size_t numPolicies = conf->securityPoliciesSize + policiesToAdd.size(); conf->securityPolicies = static_cast<UA_SecurityPolicy *>(UA_realloc(conf->securityPolicies, sizeof(UA_SecurityPolicy) * numPolicies)); - UA_StatusCode result = UA_STATUSCODE_BADINVALIDARGUMENT; + UA_StatusCode result = UA_STATUSCODE_GOOD; - if (desc.securityPolicy() == Basic128Rsa15Policy) - result = UA_SecurityPolicy_Basic128Rsa15(&conf->securityPolicies[conf->securityPoliciesSize++], - cert, key, conf->logging); - else if (desc.securityPolicy() == Basic256Policy) - result = UA_SecurityPolicy_Basic256(&conf->securityPolicies[conf->securityPoliciesSize++], - cert, key, conf->logging); - else if (desc.securityPolicy() == Aes256Sha256RsaPssPolicy) - result = UA_SecurityPolicy_Aes256Sha256RsaPss(&conf->securityPolicies[conf->securityPoliciesSize++], + for (const auto &policy : policiesToAdd) { + if (policy == Basic128Rsa15Policy) + result = UA_SecurityPolicy_Basic128Rsa15(&conf->securityPolicies[conf->securityPoliciesSize++], + cert, key, conf->logging); + else if (policy == Basic256Policy) + result = UA_SecurityPolicy_Basic256(&conf->securityPolicies[conf->securityPoliciesSize++], + cert, key, conf->logging); + else if (policy == Aes256Sha256RsaPssPolicy) + result = UA_SecurityPolicy_Aes256Sha256RsaPss(&conf->securityPolicies[conf->securityPoliciesSize++], + cert, key, conf->logging); + else if (policy == Basic256Sha256Policy) + result = UA_SecurityPolicy_Basic256Sha256(&conf->securityPolicies[conf->securityPoliciesSize++], cert, key, conf->logging); - else if (desc.securityPolicy() == Basic256Sha256Policy) - result = UA_SecurityPolicy_Basic256Sha256(&conf->securityPolicies[conf->securityPoliciesSize++], - cert, key, conf->logging); - else if (desc.securityPolicy() == Aes128Sha256RsaOaepPolicy) - result = UA_SecurityPolicy_Aes128Sha256RsaOaep(&conf->securityPolicies[conf->securityPoliciesSize++], - cert, key, conf->logging); + else if (policy == Aes128Sha256RsaOaepPolicy) + result = UA_SecurityPolicy_Aes128Sha256RsaOaep(&conf->securityPolicies[conf->securityPoliciesSize++], + cert, key, conf->logging); + + if (result != UA_STATUSCODE_GOOD) { + // UA_ClientConfig_clear() doesn't check for a valid clear() pointer on the policy + --conf->securityPoliciesSize; + return result; + } + } return result; } @@ -2273,21 +2288,30 @@ UA_StatusCode Open62541AsyncBackend::setAuthSecurityPolicyInClientConfig(UA_ClientConfig *conf, const UA_ByteString &cert, const UA_ByteString &key, const QOpcUaEndpointDescription &desc, - QOpcUaUserTokenPolicy::TokenType tokenType) + QOpcUaUserTokenPolicy::TokenType tokenType, + QString *addedSecurityPolicyUri) { - // Nothing to do - if (tokenType == QOpcUaUserTokenPolicy::TokenType::Anonymous) - return UA_STATUSCODE_GOOD; + // Open62541 now also demands the endpoint's security policy for anonymous tokens + // if the policy uri in the token is empty. + + // Due to a bug in open62541 1.4, config->securityPolicies must also contain the + // policy used for authentication, even if the token is encrypted using the policy + // from config->authSecurityPolicies. + // Until this is fixed, the addedSecurityPolicyUri parameter provides the used + // policy to setSecurityPolicyInClientConfig(). // No None policy for auth, but all encrypting policies const size_t numPolicies = 1; + if (addedSecurityPolicyUri) + addedSecurityPolicyUri->clear(); + for (size_t i = 0; i < conf->authSecurityPoliciesSize; i++) { conf->authSecurityPolicies[i].clear(&conf->authSecurityPolicies[i]); } - - conf->authSecurityPolicies = static_cast<UA_SecurityPolicy*>(UA_realloc(conf->authSecurityPolicies, sizeof(UA_SecurityPolicy) * numPolicies)); - conf->authSecurityPoliciesSize = numPolicies; + UA_free(conf->authSecurityPolicies); + conf->authSecurityPolicies = nullptr; + conf->authSecurityPoliciesSize = 0; UA_StatusCode result = UA_STATUSCODE_BADINVALIDARGUMENT; @@ -2301,9 +2325,6 @@ if (currentPolicy.isEmpty()) currentPolicy = desc.securityPolicy(); - if (currentPolicy == NonePolicy) - continue; - // Assumes that supportedSecurityPolicies() is sorted by strength // The supportedSecurityPolicies() has been modified accordingly. const auto index = m_clientImpl->supportedSecurityPolicies().indexOf(currentPolicy); @@ -2314,6 +2335,13 @@ } if (!selectedPolicy.isEmpty()) { + if (selectedPolicy == NonePolicy) + return UA_STATUSCODE_GOOD; + + conf->authSecurityPolicies = static_cast<UA_SecurityPolicy*>(UA_realloc(conf->authSecurityPolicies, + sizeof(UA_SecurityPolicy) * numPolicies)); + conf->authSecurityPoliciesSize = numPolicies; + if (selectedPolicy == Basic128Rsa15Policy) result = UA_SecurityPolicy_Basic128Rsa15(&conf->authSecurityPolicies[0], cert, key, conf->logging); @@ -2329,6 +2357,16 @@ else if (selectedPolicy == Aes128Sha256RsaOaepPolicy) result = UA_SecurityPolicy_Aes128Sha256RsaOaep(&conf->authSecurityPolicies[0], cert, key, conf->logging); + + if (result != UA_STATUSCODE_GOOD) { + // UA_ClientConfig_clear() doesn't check for a valid clear() pointer on the policy + conf->authSecurityPoliciesSize = 0; + UA_free(conf->authSecurityPolicies); + conf->authSecurityPolicies = nullptr; + } + + if (addedSecurityPolicyUri) + *addedSecurityPolicyUri = selectedPolicy; } return result; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541backend.h new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541backend.h --- old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541backend.h 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541backend.h 2025-08-18 01:36:59.000000000 +0200 @@ -115,9 +115,10 @@ #ifdef UA_ENABLE_ENCRYPTION bool loadPrivateKeyWithPotentialPassword(const QString &privateKeyPath, UA_ByteString &privateKey); UA_StatusCode setSecurityPolicyInClientConfig(UA_ClientConfig *conf, const UA_ByteString &cert, const UA_ByteString &key, - const QOpcUaEndpointDescription &desc); + const QOpcUaEndpointDescription &desc, const QString &additionalAuthSecurityPolicy); UA_StatusCode setAuthSecurityPolicyInClientConfig(UA_ClientConfig *conf, const UA_ByteString &cert, const UA_ByteString &key, - const QOpcUaEndpointDescription &desc, QOpcUaUserTokenPolicy::TokenType tokenType); + const QOpcUaEndpointDescription &desc, QOpcUaUserTokenPolicy::TokenType tokenType, + QString *addedSecurityPolicyUri); #endif QTimer m_clientIterateTimer; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541valueconverter.cpp new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541valueconverter.cpp --- old/qtopcua-everywhere-src-6.9.1/src/plugins/opcua/open62541/qopen62541valueconverter.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/src/plugins/opcua/open62541/qopen62541valueconverter.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -1152,6 +1152,8 @@ ptr->browsePath = static_cast<UA_QualifiedName *>(UA_Array_new(value.browsePath().size(), &UA_TYPES[UA_TYPES_QUALIFIEDNAME])); for (size_t i = 0; i < ptr->browsePathSize; ++i) scalarFromQt<UA_QualifiedName, QOpcUaQualifiedName>(value.browsePath().at(i), &ptr->browsePath[i]); + } else { + ptr->browsePath = static_cast<UA_QualifiedName *>(UA_EMPTY_ARRAY_SENTINEL); } } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/auto/clientSetupInCpp/tst_clientSetupInCpp.cpp new/qtopcua-everywhere-src-6.9.2/tests/auto/clientSetupInCpp/tst_clientSetupInCpp.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/auto/clientSetupInCpp/tst_clientSetupInCpp.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/auto/clientSetupInCpp/tst_clientSetupInCpp.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -80,6 +80,7 @@ Q_OBJECT public: SetupClass() { + qputenv("QT_QPA_PLATFORM", "offscreen"); }; ~SetupClass() { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/auto/declarative/tst_opcua.cpp new/qtopcua-everywhere-src-6.9.2/tests/auto/declarative/tst_opcua.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/auto/declarative/tst_opcua.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/auto/declarative/tst_opcua.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -19,6 +19,7 @@ Q_OBJECT public: SetupClass() { + qputenv("QT_QPA_PLATFORM", "offscreen"); }; ~SetupClass() { } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/auto/security/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/tests/auto/security/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/tests/auto/security/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/auto/security/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -16,6 +16,7 @@ # Resources: set(certs_resource_files "pki/own/certs/tst_security.der" + "pki/own/certs/invalid_cert.der" "pki/own/private/privateKeyWithPassword_secret.pem" "pki/own/private/privateKeyWithoutPassword.pem" "pki/trusted/certs/ca.der" diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/auto/security/pki/own/certs/invalid_cert.der new/qtopcua-everywhere-src-6.9.2/tests/auto/security/pki/own/certs/invalid_cert.der --- old/qtopcua-everywhere-src-6.9.1/tests/auto/security/pki/own/certs/invalid_cert.der 1970-01-01 01:00:00.000000000 +0100 +++ new/qtopcua-everywhere-src-6.9.2/tests/auto/security/pki/own/certs/invalid_cert.der 2025-08-18 01:36:59.000000000 +0200 @@ -0,0 +1 @@ +This is not a valid certificate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/auto/security/tst_security.cpp new/qtopcua-everywhere-src-6.9.2/tests/auto/security/tst_security.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/auto/security/tst_security.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/auto/security/tst_security.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -16,6 +16,8 @@ #include <QTcpSocket> #include <QTcpServer> +using namespace Qt::Literals::StringLiterals; + const int signalSpyTimeout = 10000; static QString messageSecurityModeToString(QOpcUaEndpointDescription::MessageSecurityMode msm) @@ -42,6 +44,18 @@ } \ } +#define defineDataMethodNonePolicy(name) void name() \ +{\ + QTest::addColumn<QString>("backend"); \ + QTest::addColumn<QOpcUaEndpointDescription>("endpoint"); \ + for (const auto &backend : std::as_const(m_backends)) { \ + const QString rowName = QStringLiteral("%1 using %2 %3") \ + .arg(backend, m_noneEndpoint.securityPolicy(), \ + messageSecurityModeToString(m_noneEndpoint.securityMode())); \ + QTest::newRow(rowName.toLatin1().constData()) << backend << m_noneEndpoint; \ + } \ +} + class Tst_QOpcUaSecurity: public QObject { Q_OBJECT @@ -53,6 +67,12 @@ void initTestCase(); void cleanupTestCase(); + defineDataMethodNonePolicy(connectAndDisconnectNonePolicyAnonymousUnencryptedKey_data) + void connectAndDisconnectNonePolicyAnonymousUnencryptedKey(); + + defineDataMethodNonePolicy(connectAndDisconnectNonePolicyUsernameUnencryptedKey_data) + void connectAndDisconnectNonePolicyUsernameUnencryptedKey(); + defineDataMethod(connectAndDisconnectSecureUnencryptedKey_data) void connectAndDisconnectSecureUnencryptedKey(); @@ -68,6 +88,9 @@ defineDataMethod(connectAndDisconnectSecureWithCertAuthOtherCert_data) void connectAndDisconnectSecureWithCertAuthOtherCert(); + defineDataMethod(initializeWithBrokenCert_data) + void initializeWithBrokenCert(); + private: QString envOrDefault(const char *env, QString def) { @@ -78,6 +101,7 @@ QStringList m_backends; QProcess m_serverProcess; QList<QOpcUaEndpointDescription> m_endpoints; + QOpcUaEndpointDescription m_noneEndpoint; QString m_discoveryEndpoint; QOpcUaProvider m_opcUa; QSharedPointer<QTemporaryDir> m_pkiData; @@ -133,7 +157,7 @@ QVERIFY2(server.listen(defaultHost, defaultPort) == true, "Port is occupied by another process. Check for defunct server."); server.close(); - m_serverProcess.start(m_testServerPath); + m_serverProcess.start(m_testServerPath, { QStringLiteral("--noNonePolicyPassword") }); QVERIFY2(m_serverProcess.waitForStarted(), qPrintable(m_serverProcess.errorString())); // Let the server come up @@ -183,11 +207,113 @@ if (QOpcUa::isSecurePolicy(endpoint.securityPolicy())) { m_endpoints.append(endpoint); qDebug() << endpoint.securityPolicy(); + } else if (endpoint.securityPolicy().contains(QStringLiteral("None"))) { + m_noneEndpoint = endpoint; } } } } +void Tst_QOpcUaSecurity::connectAndDisconnectNonePolicyAnonymousUnencryptedKey() +{ + QFETCH(QString, backend); + QFETCH(QOpcUaEndpointDescription, endpoint); + + QScopedPointer<QOpcUaClient> client(m_opcUa.createClient(backend)); + QVERIFY2(client, QStringLiteral("Loading backend failed: %1").arg(backend).toLatin1().data()); + + const QString pkidir = m_pkiData->path(); + QOpcUaPkiConfiguration pkiConfig; + pkiConfig.setClientCertificateFile(pkidir + "/own/certs/tst_security.der"); + pkiConfig.setPrivateKeyFile(pkidir + "/own/private/privateKeyWithoutPassword.pem"); + pkiConfig.setTrustListDirectory(pkidir + "/trusted/certs"); + pkiConfig.setRevocationListDirectory(pkidir + "/trusted/crl"); + pkiConfig.setIssuerListDirectory(pkidir + "/issuers/certs"); + pkiConfig.setIssuerRevocationListDirectory(pkidir + "/issuers/crl"); + + const auto identity = pkiConfig.applicationIdentity(); + QOpcUaAuthenticationInformation authInfo; + // authInfo.setUsernameAuthentication("user1", "password"); + authInfo.setAnonymousAuthentication(); + + client->setAuthenticationInformation(authInfo); + client->setApplicationIdentity(identity); + client->setPkiConfiguration(pkiConfig); + + qDebug() << "Testing security policy" << endpoint.securityPolicy(); + QSignalSpy connectSpy(client.data(), &QOpcUaClient::stateChanged); + + client->connectToEndpoint(endpoint); + connectSpy.wait(signalSpyTimeout); + if (connectSpy.size() != 2) + connectSpy.wait(signalSpyTimeout); + + QCOMPARE(connectSpy.size(), 2); + QCOMPARE(connectSpy.at(0).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Connecting); + QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Connected); + + QCOMPARE(client->endpoint(), endpoint); + QCOMPARE(client->error(), QOpcUaClient::NoError); + + connectSpy.clear(); + client->disconnectFromEndpoint(); + connectSpy.wait(signalSpyTimeout); + if (connectSpy.size() != 2) + connectSpy.wait(signalSpyTimeout); + QCOMPARE(connectSpy.size(), 2); + QCOMPARE(connectSpy.at(0).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Closing); + QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Disconnected); +} + +void Tst_QOpcUaSecurity::connectAndDisconnectNonePolicyUsernameUnencryptedKey() +{ + QFETCH(QString, backend); + QFETCH(QOpcUaEndpointDescription, endpoint); + + QScopedPointer<QOpcUaClient> client(m_opcUa.createClient(backend)); + QVERIFY2(client, QStringLiteral("Loading backend failed: %1").arg(backend).toLatin1().data()); + + const QString pkidir = m_pkiData->path(); + QOpcUaPkiConfiguration pkiConfig; + pkiConfig.setClientCertificateFile(pkidir + "/own/certs/tst_security.der"); + pkiConfig.setPrivateKeyFile(pkidir + "/own/private/privateKeyWithoutPassword.pem"); + pkiConfig.setTrustListDirectory(pkidir + "/trusted/certs"); + pkiConfig.setRevocationListDirectory(pkidir + "/trusted/crl"); + pkiConfig.setIssuerListDirectory(pkidir + "/issuers/certs"); + pkiConfig.setIssuerRevocationListDirectory(pkidir + "/issuers/crl"); + + const auto identity = pkiConfig.applicationIdentity(); + QOpcUaAuthenticationInformation authInfo; + authInfo.setUsernameAuthentication("user1", "password"); + + client->setAuthenticationInformation(authInfo); + client->setApplicationIdentity(identity); + client->setPkiConfiguration(pkiConfig); + + QSignalSpy connectSpy(client.data(), &QOpcUaClient::stateChanged); + + client->connectToEndpoint(endpoint); + connectSpy.wait(signalSpyTimeout); + if (connectSpy.size() != 2) + connectSpy.wait(signalSpyTimeout); + + QCOMPARE(connectSpy.size(), 2); + QCOMPARE(connectSpy.at(0).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Connecting); + QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Connected); + + QCOMPARE(client->endpoint(), endpoint); + QCOMPARE(client->error(), QOpcUaClient::NoError); + + connectSpy.clear(); + client->disconnectFromEndpoint(); + connectSpy.wait(signalSpyTimeout); + if (connectSpy.size() != 2) + connectSpy.wait(signalSpyTimeout); + QCOMPARE(connectSpy.size(), 2); + QCOMPARE(connectSpy.at(0).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Closing); + QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Disconnected); +} + void Tst_QOpcUaSecurity::connectAndDisconnectSecureUnencryptedKey() { if (m_endpoints.size() == 0) @@ -530,6 +656,52 @@ QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Disconnected); } +void Tst_QOpcUaSecurity::initializeWithBrokenCert() +{ + if (m_endpoints.size() == 0) + QSKIP("No secure endpoints available"); + + QFETCH(QString, backend); + QFETCH(QOpcUaEndpointDescription, endpoint); + + QScopedPointer<QOpcUaClient> client(m_opcUa.createClient(backend)); + QVERIFY2(client, u"Loading backend failed: %1"_s.arg(backend).toUtf8().data()); + + if (!client->supportedSecurityPolicies().contains(endpoint.securityPolicy())) { + QSKIP(u"This test is skipped because backend %1 " + "does not support security policy %2"_s + .arg(client->backend(), endpoint.securityPolicy()).toUtf8().constData()); + } + + const QString pkidir = m_pkiData->path(); + QOpcUaPkiConfiguration pkiConfig; + pkiConfig.setClientCertificateFile(pkidir + "/own/certs/invalid_cert.der"); + pkiConfig.setPrivateKeyFile(pkidir + "/own/private/privateKeyWithoutPassword.pem"); + pkiConfig.setTrustListDirectory(pkidir + "/trusted/certs"); + pkiConfig.setRevocationListDirectory(pkidir + "/trusted/crl"); + pkiConfig.setIssuerListDirectory(pkidir + "/issuers/certs"); + pkiConfig.setIssuerRevocationListDirectory(pkidir + "/issuers/crl"); + + const auto identity = pkiConfig.applicationIdentity(); + QOpcUaAuthenticationInformation authInfo; + authInfo.setUsernameAuthentication("user1", "password"); + client->setAuthenticationInformation(authInfo); + client->setApplicationIdentity(identity); + client->setPkiConfiguration(pkiConfig); + + qDebug() << "Testing invalid certificate load with security policy" << endpoint.securityPolicy(); + QSignalSpy connectSpy(client.data(), &QOpcUaClient::stateChanged); + + client->connectToEndpoint(endpoint); + connectSpy.wait(signalSpyTimeout); + if (client->state() == QOpcUaClient::Connecting) + connectSpy.wait(signalSpyTimeout); + + QCOMPARE(connectSpy.size(), 2); + QCOMPARE(connectSpy.at(0).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Connecting); + QCOMPARE(connectSpy.at(1).at(0).value<QOpcUaClient::ClientState>(), QOpcUaClient::Disconnected); +} + void Tst_QOpcUaSecurity::cleanupTestCase() { if (m_serverProcess.state() == QProcess::Running) { diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/manual/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/tests/manual/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/tests/manual/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/manual/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -1,6 +1,6 @@ # Copyright (C) 2022 The Qt Company Ltd. # SPDX-License-Identifier: BSD-3-Clause -if(QT_FEATURE_ssl AND NOT APPLE AND NOT WINRT) +if(QT_FEATURE_ssl AND QT_FEATURE_gds AND NOT APPLE AND NOT WINRT) add_subdirectory(gds) endif() diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/manual/gds/tst_gds.cpp new/qtopcua-everywhere-src-6.9.2/tests/manual/gds/tst_gds.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/manual/gds/tst_gds.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/manual/gds/tst_gds.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -77,7 +77,7 @@ static void commonGdsClientSetup(QOpcUaGdsClient &gc, const QString &backend, const QOpcUaEndpointDescription endpoint) { - QObject::connect(&gc, &QOpcUaGdsClient::authenticationRequired, provideCredentials); + QObject::connect(&gc, &QOpcUaGdsClient::authenticationRequired, &gc, provideCredentials); gc.setBackend(backend); gc.setEndpoint(endpoint); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/CMakeLists.txt new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/CMakeLists.txt --- old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/CMakeLists.txt 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/CMakeLists.txt 2025-08-18 01:36:59.000000000 +0200 @@ -35,6 +35,8 @@ generated/ OUTPUT_DIRECTORY "${CMAKE_CURRENT_BINARY_DIR}" + NO_UNITY_BUILD_SOURCES + ../../src/plugins/opcua/open62541/qopen62541valueconverter.cpp LIBRARIES Qt::Core Qt::OpcUaPrivate diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/main.cpp new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/main.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/main.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/main.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -5,6 +5,7 @@ #include "qopen62541utils.h" #include "generated/namespace_qtopcuatestmodel_generated.h" +#include <QtCore/QCommandLineParser> #include <QtCore/QCoreApplication> #include <QtCore/QDebug> #include <QtCore/QThread> @@ -38,7 +39,7 @@ running = false; } -int main() +int main(int argc, char **argv) { signal(SIGINT, signalHandler); signal(SIGTERM, signalHandler); @@ -48,8 +49,17 @@ signal(SIGPIPE, SIG_IGN); #endif + QCommandLineParser parser; + const QCommandLineOption noNonePasswordOption(QStringLiteral("noNonePolicyPassword")); + parser.addOption(noNonePasswordOption); + + QStringList args; + for (int i = 0; i < argc; ++i) + args.push_back(QString::fromUtf8(argv[i])); + parser.parse(args); + TestServer server; - if (!server.init()) { + if (!server.init(parser.isSet(noNonePasswordOption))) { qCritical() << "Could not initialize server."; return -1; } Binary files old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der and new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/pki/trusted/certs/opcuaviewer.der differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/testserver.cpp new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/testserver.cpp --- old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/testserver.cpp 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/testserver.cpp 2025-08-18 01:36:59.000000000 +0200 @@ -237,13 +237,11 @@ return false; } - config->allowNonePolicyPassword = true; - return true; } #endif -bool TestServer::init() +bool TestServer::init(bool noNonePolicyPassword) { bool success; @@ -257,6 +255,7 @@ #if defined UA_ENABLE_ENCRYPTION success = createSecureServerConfig(m_config); + m_config->allowNonePolicyPassword = !noNonePolicyPassword; #else success = createInsecureServerConfig(m_config); #endif diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/testserver.h new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/testserver.h --- old/qtopcua-everywhere-src-6.9.1/tests/open62541-testserver/testserver.h 2025-05-29 02:20:20.000000000 +0200 +++ new/qtopcua-everywhere-src-6.9.2/tests/open62541-testserver/testserver.h 2025-08-18 01:36:59.000000000 +0200 @@ -60,7 +60,7 @@ public: explicit TestServer(QObject *parent = nullptr); ~TestServer(); - bool init(); + bool init(bool noNonePolicyPassword); bool createInsecureServerConfig(UA_ServerConfig *config); #if defined UA_ENABLE_ENCRYPTION bool createSecureServerConfig(UA_ServerConfig *config);