diff options
author | Jannis Voelker <jannis.voelker@basyskom.com> | 2019-02-05 15:38:28 +0100 |
---|---|---|
committer | Jannis Völker <jannis.voelker@basyskom.com> | 2019-02-05 15:11:29 +0000 |
commit | a5eab4b543d5df1f1e8b7d27fedcd898339024e9 (patch) | |
tree | 6a55b921c77e5760182185f818dba58042b31f36 /examples | |
parent | bb5717c93ae5d9b3b9f28ed0de9069ade254dcc3 (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>
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); |