setHostNameInCertificate Method (SQLServerDataSource)

 

DownloadDownload JDBC Driver

Sets the host name to be used in validating the SQL Server Secure Sockets Layer (SSL) certificate.

  
public void setHostNameInCertificate(java.lang.String hostNameInCertificate)  

Parameters

hostNameInCertificate

A String that contains the host name.

The hostNameInCertificate value is used to validate the SQL Server SSL certificate when the communication layer is encrypted by using SSL. The default value is null.

If the hostNameInCertificate property is set to null or unspecified, the Microsoft JDBC Driver for SQL Server will use the serverName property value to validate against the SQL Server SSL certificate. If the hostNameInCertificate property is set to a string or an empty string "", the driver will use that value to validate the server SSL certificate.

SQLServerDataSource Members
SQLServerDataSource Class

Community Additions

ADD
Show: