Skip to content

Latest commit

 

History

History
48 lines (33 loc) · 2.55 KB

settruststorepassword-method-sqlserverdatasource.md

File metadata and controls

48 lines (33 loc) · 2.55 KB
title description author ms.author ms.date ms.service ms.subservice ms.topic apilocation apiname apitype
setTrustStorePassword Method (SQLServerDataSource)
setTrustStorePassword Method (SQLServerDataSource)
David-Engel
davidengel
01/19/2017
sql
connectivity
reference
setTrustStorePassword Method (SQLServerDataSource)
setTrustStorePassword Method (SQLServerDataSource)
Assembly

setTrustStorePassword Method (SQLServerDataSource)

[!INCLUDEDriver_JDBC_Download]

Sets the password that is used to check the integrity of the trustStore data.

Syntax

  
public void setTrustStorePassword(java.lang.String trustStorePassword)  

Parameters

trustStorePassword

A String that contains the password that is used to check the integrity of the trustStore data.

Remarks

The trustStorePassword property can be specified along with the trustStore property and its value is used to check the integrity of the trustStore file.

If the trustStore property is set but the trustStorePassword property is not set, the integrity of the trustStore is not checked.

When both trustStore and trustStorePassword properties are unspecified, the driver will use the Java Virtual Machine (JVM) system properties, "javax.net.ssl.trustStore" and "javax.net.ssl.trustStorePassword". If the "javax.net.ssl.trustStorePassword" system property is not specified, the integrity of the trustStore is not checked.

If the trustStore property is not set but the trustStorePassword property is set, the JDBC driver will use the file specified by the "javax.net.ssl.trustStore" as a trust store and the integrity of the trust store is checked by using the specified trustStorePassword. This might be needed when the client application does not want to store the password in the JVM system property.

For more information, see Setting the Connection Properties.

Beginning in JDBC Driver 3.0, if you set SQLServerDataSource.setTrustStorePassword before binding the data source properties, you must call SQLServerDataSource.setTrustStorePassword before getting the connection. For more information, see SQLServerDataSource.getReference.

See Also

SQLServerDataSource Members
SQLServerDataSource Class