Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

open62541 1.4.0 UA_Client_getEndpoints does not seem to be working if opc server does not support NONE security policy and mode #6464

Closed
hdabis1234 opened this issue May 8, 2024 · 1 comment

Comments

@hdabis1234
Copy link

open62541 1.4.0
OS Windows -> using vs 2019

The following does not seem to work in 1.4.0:

UA_Client* client = UA_Client_new();
UA_ClientConfig_setDefault(UA_Client_getConfig(client));
UA_EndpointDescription* endpointArray = NULL;
UA_ApplicationDescription* applicationDescriptionArray = NULL;
retval = UA_Client_getEndpoints(client, "opc.tcp:https://localhost:4853", &endpointArraySize, &endpointArray);

Although it gets the endpoints, it does not seem to return them (retval = 0x80020000). We believe the reason for this is because the opc server we are trying to connect to does not support NONE/NONE security mode, hence the matching withinin:

static void responseGetEndpoints(UA_Client *client, void *userdata,
UA_UInt32 requestId, void *response) ...

/* SecurityPolicy available? */
if(!getSecurityPolicy(client, endpoint->securityPolicyUri)) {
UA_LOG_INFO(client->config.logging, UA_LOGCATEGORY_CLIENT,
"Rejecting endpoint %lu: security policy not available",
(long unsigned)i);
continue;
}

fails.

This worked fine in 1.3. So just wondering if we are missing something here.

Thanks.

Homam Dabis.

@hdabis1234
Copy link
Author

So provided examples don't work anymore. Am I missing something here. Is there an alternative way of getting the endpoints.

Normal use case would be to get the server supported endpoints and then the user decides what to do with them.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant