Muokkaa

Jaa


setTrustStorePassword Method (SQLServerDataSource)

Download JDBC driver

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