title | description | author | ms.author | ms.date | ms.service | ms.subservice | ms.topic | apilocation | apiname | apitype |
---|---|---|---|---|---|---|---|---|---|---|
setHostNameInCertificate Method (SQLServerDataSource) |
setHostNameInCertificate Method (SQLServerDataSource) |
David-Engel |
davidengel |
01/19/2017 |
sql |
connectivity |
reference |
setHostNameInCertificate Method (SQLServerDataSource) |
setHostNameInCertificate Method (SQLServerDataSource) |
Assembly |
[!INCLUDEDriver_JDBC_Download]
Sets the host name to be used in validating the [!INCLUDEssNoVersion] Transport Layer Security (TLS), previously known as Secure Sockets Layer (SSL), certificate.
public void setHostNameInCertificate(java.lang.String hostNameInCertificate)
hostNameInCertificate
A String that contains the host name.
The hostNameInCertificate value is used to validate the [!INCLUDEssNoVersion] TLS/SSL certificate when the communication layer is encrypted by using TLS. The default value is null.
If the hostNameInCertificate property is set to null or unspecified, the [!INCLUDEjdbcNoVersion] will use the serverName property value to validate against the [!INCLUDEssNoVersion] TLS/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 TLS/SSL certificate.