Configuring TLS Verification
If you are connecting to a SQL Server instance that has Transport Layer Security (TLS) enabled, then you can use TLS to encrypt your connection. When connecting to a server using TLS, the connector can be configured to verify the identity of the server. See Security and Authentication for more details on TLS.
You can set the connection properties described below in a connection string or in a DSN (in the odbc.ini
file). Settings in the connection string take precedence over
settings in the DSN.
Configuring One-way TLS Verification
You can configure the connector to verify the identity of the server.
To configure one-way TLS verification:
- To encrypt your connection using TLS, set the
Encryptproperty toyes. - To specify the minimum version of TLS that the connector must use to connect to the server, set the
Min_TLSproperty to the required TLS version. The supported options include1.0for TLS 1.0,1.1for TLS 1.1, and1.2for TLS 1.2. - To enable one-way authentication so that the connector verifies the identity of the server, set the
TrustServerCertificateproperty tono. - To specify the CA certificate that you want to use to verify the server certificate, set the
CACertificateproperty to the full path and file name of the CA certificate.
Configuring a TLS Connection without Identity Verification
You can configure the connector to use TLS encryption without verifying the identity of the server.
To configure a TLS connection without verification:
- To encrypt your connection using TLS, set the
Encryptproperty toyes. - To specify the minimum version of TLS that the connector must use to connect to the server, set the
Min_TLSproperty to the required TLS version. The supported options include1.0for TLS 1.0,1.1for TLS 1.1, and1.2for TLS 1.2. - To trust the server certificate instead of verifying it, set the
TrustServerCertificateproperty toyes.