Skip to content

Latest commit

 

History

History
41 lines (30 loc) · 1.86 KB

File metadata and controls

41 lines (30 loc) · 1.86 KB
title setHostNameInCertificate Method (SQLServerDataSource)
description setHostNameInCertificate Method (SQLServerDataSource)
author dlevy-msft-sql
ms.author dlevy
ms.reviewer davidengel, machavan, sunilbs
ms.date 01/19/2017
ms.service sql
ms.subservice connectivity
ms.topic reference
apilocation setHostNameInCertificate Method (SQLServerDataSource)
apiname setHostNameInCertificate Method (SQLServerDataSource)
apitype Assembly

setHostNameInCertificate Method (SQLServerDataSource)

[!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.

Syntax

  
public void setHostNameInCertificate(java.lang.String hostNameInCertificate)  

Parameters

hostNameInCertificate

A String that contains the host name.

Remarks

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.

See Also

SQLServerDataSource Members
SQLServerDataSource Class