Thread: SSL Connection String

SSL Connection String

From
tiamoh m
Date:
Hello,

I wish to find out the connection string to only establish ssl connection after it is set up.

kind regards
Tiamoh J 

Re: SSL Connection String

From
Erik Wienhold
Date:
On 2024-09-18 17:08 +0200, tiamoh m wrote:
> I wish to find out the connection string to only establish ssl connection
> after it is set up.

Use sslmode=require (or verify-ca/verify-full if necessary) for that:
https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

-- 
Erik



Re: SSL Connection String

From
tiamoh m
Date:
Thank you Erik.

On Wed, Sep 18, 2024 at 1:53 PM Erik Wienhold <ewie@ewie.name> wrote:
On 2024-09-18 17:08 +0200, tiamoh m wrote:
> I wish to find out the connection string to only establish ssl connection
> after it is set up.

Use sslmode=require (or verify-ca/verify-full if necessary) for that:
https://www.postgresql.org/docs/current/libpq-ssl.html#LIBPQ-SSL-SSLMODE-STATEMENTS

--
Erik