Certificate handling
The following figure describes the certificate handling between the OPC UA Server and Client application using the UA_Connect function block.
The used SessionConnectInfo input variables in this figure are examples for an establishment of a secure session.
The certificate check on client side includes a check of the hostnames in the used server certificate and the ServerEndpointUrl of the UA_Connect function block. Normally this should match, because otherwise an attacker could use any trusted certificate to fake a server's identity.
Nevertheless, the check can be disabled by the DisableServerCertificateHostnameCheck variable. It-s useful if the IT infrastructure is not able to resolve hostnames via DNS server and an IP address has to be used for the ServerEndpointUrl.
From a security point of view, it is not recommended to disable the hostname check.