Attribute

HostNameInCertificate (hnic)

Purpose

Specifies a host name for certificate validation when SSL encryption is enabled and validation is enabled (ValidateServerCertificate=1). This option is optional and provides additional security against man-in-the-middle (MITM) attacks by ensuring that the server the driver is connecting to is the server that was requested.

Valid Values

host_name

where:

host_name

is a valid host name.

Behavior

If host_name is specified, the driver compares the specified host name to the DNSName value of the SubjectAlternativeName in the certificate. If the certificate does not have a SubjectAlternativeName, the driver compares the host name with the Common Name (CN) part of the certificate. If the values do not match, the connection fails and the driver throws an exception.

Notes

  • If SSL encryption or certificate validation is not enabled, this option is ignored.
  • If SSL encryption and validation is enabled and this option is unspecified, the driver uses the value of the Server Name (ServerName) option to validate the certificate.

Default Value

No default value