open62541
-
I need to create a OPC-UA client connecting to a server using either a certificate or user/password authentication. While testing the connection with neither of these I got a BadAuthenticationToken error.
In the case below encryption was disabled on endpoint 0, and the client was trying to connect without any kind of authentication.
Reading the library documentation it seems it may be an issue with the encryption...After that I tried adding encryption to the client, attempting to connect to the other endpoints, but my linker retun linker errors when linking the openssl libraries libssl.lib and the libcrypto.lib. I already tried manually adding these libraries to the linker but it returns LINK1181 anyway.
Has anyone ever had these kind of issues?
-
I need to create a OPC-UA client connecting to a server using either a certificate or user/password authentication. While testing the connection with neither of these I got a BadAuthenticationToken error.
In the case below encryption was disabled on endpoint 0, and the client was trying to connect without any kind of authentication.
Reading the library documentation it seems it may be an issue with the encryption...After that I tried adding encryption to the client, attempting to connect to the other endpoints, but my linker retun linker errors when linking the openssl libraries libssl.lib and the libcrypto.lib. I already tried manually adding these libraries to the linker but it returns LINK1181 anyway.
Has anyone ever had these kind of issues?
@casina When your
QOpcUaClient
emitsendpointsRequestFinished
you can do following in the slot to change the endpoint.void UaClient::endpointsRequestFinished( QList<QOpcUaEndpointDescription> endpoints, QOpcUa::UaStatusCode statusCode, QUrl requestUrl) { for (QOpcUaEndpointDescription& epd : endpoints) { // Connect to unsecure node if (epd.securityMode() == QOpcUaEndpointDescription::MessageSecurityMode::None && epd.securityPolicy().contains("None")) { m_client->connectToEndpoint(epd); } }
Maybe your opcua server does not allow a connection to the unsecured endpoint as you try to do. With the above mentioned approach you can select a different endpoint.
To me it looks like during building the opcua module cmake was not able to find openssl on your pc. This is required to be able to use secure endpoints. All secure endpoints from your server are annotated with "not supported".
https://doc.qt.io/qt-6/qtopcua-build-openssl.html