Re: How to check is connection encrypted

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Andrus" <kobruleht2(at)hot(dot)ee>
Cc: "pgsql-general" <pgsql-general(at)postgresql(dot)org>
Subject: Re: How to check is connection encrypted
Date: 2019-03-22 14:11:48
Message-ID: 25068.1553263908@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Andrus" <kobruleht2(at)hot(dot)ee> writes:
> Client accesses server from Windows 10 using psqlODBC driver with
> sslmode=allow in connection string.
> How to verify that connection is encrypted ?

When using libpq directly, you could use PQsslInUse(),
or PQsslAttribute() for more detailed info. I'm not
sure if ODBC provides any way to get at that.

Or, if you want to check/enforce this from the server side,
you could enable log_connections and see what's logged;
or simply change pg_hba.conf to disallow non-SSL connections.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Adrian Klaver 2019-03-22 14:21:02 Re: How to check is connection encrypted
Previous Message Thomas Güttler 2019-03-22 13:04:15 Re: Script which shows performance of ByteA: ascii vs binary