diff options
author | Jannis Voelker <jannis.voelker@basyskom.com> | 2019-02-05 15:38:28 +0100 |
---|---|---|
committer | Rainer Keller <Rainer.Keller@qt.io> | 2019-02-20 09:47:17 +0000 |
commit | 517b711845efb0fa18e959beb5476a2598ffdd36 (patch) | |
tree | c475322ea494921e462b23467c2dd097036a4211 /examples | |
parent | 1274cfe8d2be35105007c6895f6104a679d075e0 (diff) |
opcuaviewer: Fix connect with the open62541 backend
The open62541 backend does not yet support certificate authentication
and aborts the connection attempt if it is requested.
Change-Id: Ia078156c7a17e58f72ee934ee7b0ec935f33cb22
Reviewed-by: Rainer Keller <Rainer.Keller@qt.io>
Reviewed-by: Frank Meerkoetter <frank.meerkoetter@basyskom.com>
(cherry picked from commit a5eab4b543d5df1f1e8b7d27fedcd898339024e9)
Diffstat (limited to 'examples')
-rw-r--r-- | examples/opcua/opcuaviewer/mainwindow.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/examples/opcua/opcuaviewer/mainwindow.cpp b/examples/opcua/opcuaviewer/mainwindow.cpp index f829a8f..3510bb3 100644 --- a/examples/opcua/opcuaviewer/mainwindow.cpp +++ b/examples/opcua/opcuaviewer/mainwindow.cpp @@ -220,9 +220,11 @@ void MainWindow::createClient() mOpcUaClient->setIdentity(m_identity); mOpcUaClient->setPkiConfiguration(m_pkiConfig); - QOpcUaAuthenticationInformation authInfo; - authInfo.setCertificateAuthentication(); - mOpcUaClient->setAuthenticationInformation(authInfo); + if (mOpcUaPlugin->currentText() == QStringLiteral("uacpp")) { + QOpcUaAuthenticationInformation authInfo; + authInfo.setCertificateAuthentication(); + mOpcUaClient->setAuthenticationInformation(authInfo); + } connect(mOpcUaClient, &QOpcUaClient::connected, this, &MainWindow::clientConnected); connect(mOpcUaClient, &QOpcUaClient::disconnected, this, &MainWindow::clientDisconnected); |