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:

  1. To encrypt your connection using TLS, set the Encrypt property to yes.
  2. To specify the minimum version of TLS that the connector must use to connect to the server, set the Min_TLS property to the required TLS version. The supported options include 1.0 for TLS 1.0, 1.1 for TLS 1.1, and 1.2 for TLS 1.2.
  3. To enable one-way authentication so that the connector verifies the identity of the server, set the TrustServerCertificate property to no.
  4. To specify the CA certificate that you want to use to verify the server certificate, set the CACertificate property 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:

  1. To encrypt your connection using TLS, set the Encrypt property to yes.
  2. To specify the minimum version of TLS that the connector must use to connect to the server, set the Min_TLS property to the required TLS version. The supported options include 1.0 for TLS 1.0, 1.1 for TLS 1.1, and 1.2 for TLS 1.2.
  3. To trust the server certificate instead of verifying it, set the TrustServerCertificate property to yes.