Skip to content

Latest commit

 

History

History
55 lines (39 loc) · 2.24 KB

File metadata and controls

55 lines (39 loc) · 2.24 KB
title setTrustStore Method (SQLServerDataSource) | Microsoft Docs
ms.custom
ms.date 01/19/2017
ms.prod sql
ms.prod_service connectivity
ms.reviewer
ms.technology connectivity
ms.topic conceptual
apiname
setTrustStore Method (SQLServerDataSource)
apilocation
setTrustStore Method (SQLServerDataSource)
apitype Assembly
ms.assetid bab5485d-4547-426c-adbe-44e2b5702d1d
author David-Engel
ms.author v-daenge

setTrustStore Method (SQLServerDataSource)

[!INCLUDEDriver_JDBC_Download]

Sets the path (including file name) to the certificate trustStore file.

Syntax

  
public void setTrustStore(java.lang.String trustStore)  

Parameters

trustStore

A String that contains the path (including file name) to the certificate trustStore file.

Remarks

If the trustStore property is unspecified or set to null, the [!INCLUDEjdbcNoVersion] will rely on the trust manager factory's look up rules to determine which certificate store to use. The default SunX509 TrustManagerFactory tries to find the trust material in the following locations in this order:

    1. A file specified by the "javax.net.ssl.trustStore" Java Virtual Machine (JVM) system property.
    1. "<java-home>/lib/security/jssecacerts" file.
    1. "<java-home>/lib/security/cacerts" file.

For more information, see the SunX509 TrustManager Interface documentation on the Sun Microsystems Web site.

If the trustStore property is set to a string or an empty string "", the driver will use that value to find the trustStore file to validate the server TLS/SSL certificate.

The trustStorePassword property can be specified along with the trustStore property and its value is used to open the trustStore file. For more information, see setTrustStorePassword.

See Also

SQLServerDataSource Members
SQLServerDataSource Class