ODBC Driver for PostgreSQL

SSL Connection Description

SSL (Secure Sockets Layer) is the protocol for secure access to remote computers over insecure communication channels.

The SSL protocol runs above TCP/IP and below higher-level database protocol. It uses TCP/IP on behalf of the higher-level protocols, and in the process allows an SSL-enabled server to authenticate itself to an SSL-enabled client, allows the client to authenticate itself to the server, and allows both machines to establish an encrypted connection.

These capabilities address fundamental concerns about communication over the Internet and other TCP/IP networks:

SSL is based on algorithms of asymmetric encryption and digital signature. Consult PostgreSQL Reference Manual for information about Secure TCP/IP Connections with SSL.


Usage of SSL is more preferable for PostgreSQL connections than SSH because of less required settings and higher performance.

How to connect to PostgreSQL using SSL

To use SSL encryption for connection to PostgreSQL, the corresponding SSL connection options should be set:

Using ODBC Data Source Administrator


SSL Options Description




Enables or disables SSL for connection.

CA Certificate

Holds the pathname to the certificate authority file.


Holds the pathname to the certificate file.


Holds the pathname to the key file.


Determines whether or with what priority an SSL connection will be negotiated with the server. The possible values are:

  • smAllow - Negotiates trying first a non-SSL connection, then if that fails, tries an SSL connection.
  • smDisable - Only an unencrypted SSL connection will be attempted.
  • smPrefer - Negotiates trying first an SSL connection, then if that fails, tries a regular non-SSL connection.
  • smRequire - Tries only an SSL connection.

Example Connection String

Data Source=localhost;User ID=postgres;Password=postgres;Database=postgres;Schema=public;Use SSL=true;SSL CACert=c:\cacert.pem;SSL Cert=c:\client-cert.pem;Key=c:\client-key.pem;Mode=smRequire

© 2015-2018 Devart. All Rights Reserved. Request Support ODBC Forum Provide Feedback