skip to main content
Using the JDBC Client : JDBC Connection Properties : HostNameInCertificate
 

HostNameInCertificate

Description

Specifies a host name for certificate validation when SSL encryption is enabled (encrypted =1) and validation is enabled on the server (ValidateServerCertificate=true). This attribute 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. Consult your SSL administrator for the correct value.

Valid Values

string
where string is the host name or a server name.
If unspecified, the driver uses the server name specified in the connection URL or data source of the connection to validate the certificate.
If set to a host name, the driver compares the specified host name to the values included in the certificate. The connection fails if the Host Name In Certificate value does not match the value in the certificate.
If set to a #SERVERNAME#, the driver compares the server name specified in the connection string or data source of the connection to the value of the in the certificate. The connection succeeds if the values match. If the values do not match, the connection fails and the driver throws an exception.

Default

An empty string