diff options
| author | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 00:38:47 +0100 |
|---|---|---|
| committer | Thomas Vanbesien <tvanbesi@proton.me> | 2026-02-19 00:38:47 +0100 |
| commit | 9fe1d1f41069eda254e11746512d6be032db81d5 (patch) | |
| tree | 2e22ba30d3c50bb11e49bb38615215434b250a49 /src/common.c | |
| parent | 3ba285caf93d0c44815dd507a2b5de2ac40222c3 (diff) | |
| download | BobinkCOpcUa-9fe1d1f41069eda254e11746512d6be032db81d5.tar.gz BobinkCOpcUa-9fe1d1f41069eda254e11746512d6be032db81d5.zip | |
Drop auth parameter from create_unsecure_client_config
Credentials over plaintext SecurityPolicy#None are insecure, so the
unsecure client path now always uses anonymous authentication.
Diffstat (limited to 'src/common.c')
| -rw-r--r-- | src/common.c | 16 |
1 files changed, 2 insertions, 14 deletions
diff --git a/src/common.c b/src/common.c index 8f141d7..7964d62 100644 --- a/src/common.c +++ b/src/common.c @@ -379,7 +379,7 @@ print_application_description (const UA_ApplicationDescription *description, } void -print_endpoint (const UA_EndpointDescription *endpoint, size_t index) +print_endpoint_description (const UA_EndpointDescription *endpoint, size_t index) { const char *mode = "Unknown"; switch (endpoint->securityMode) @@ -484,16 +484,8 @@ create_server (UA_UInt16 port, const char *application_uri, UA_StatusCode create_unsecure_client_config (UA_ClientConfig *cc, - const char *application_uri, - const auth_config *auth) + const char *application_uri) { - if (auth && auth->mode == AUTH_CERT) - { - UA_LOG_ERROR (UA_Log_Stdout, UA_LOGCATEGORY_APPLICATION, - "Certificate authentication requires encryption"); - return UA_STATUSCODE_BADINVALIDARGUMENT; - } - UA_StatusCode retval = UA_ClientConfig_setDefault (cc); if (retval != UA_STATUSCODE_GOOD) return retval; @@ -505,10 +497,6 @@ create_unsecure_client_config (UA_ClientConfig *cc, UA_String_clear (&cc->securityPolicyUri); UA_String_copy (&UA_SECURITY_POLICY_NONE_URI, &cc->securityPolicyUri); - if (auth && auth->mode == AUTH_USER) - UA_ClientConfig_setAuthenticationUsername (cc, auth->user.username, - auth->user.password); - return UA_STATUSCODE_GOOD; } |
