pgsql: Add API functions to libpq to interrogate SSL related stuff.

From: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Add API functions to libpq to interrogate SSL related stuff.
Date: 2015-02-03 17:58:30
Message-ID: E1YIhk6-00032E-Jx@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

Add API functions to libpq to interrogate SSL related stuff.

This makes it possible to query for things like the SSL version and cipher
used, without depending on OpenSSL functions or macros. That is a good
thing if we ever get another SSL implementation.

PQgetssl() still works, but it should be considered as deprecated as it
only works with OpenSSL. In particular, PQgetSslInUse() should be used to
check if a connection uses SSL, because as soon as we have another
implementation, PQgetssl() will return NULL even if SSL is in use.

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/91fa7b4719ac583420d9143132ba4ccddefbc5b2

Modified Files
--------------
doc/src/sgml/libpq.sgml | 155 +++++++++++++++++++++++++++---
src/bin/psql/command.c | 35 +++----
src/interfaces/libpq/exports.txt | 4 +
src/interfaces/libpq/fe-secure-openssl.c | 68 +++++++++++++
src/interfaces/libpq/fe-secure.c | 20 ++++
src/interfaces/libpq/libpq-fe.h | 6 ++
6 files changed, 251 insertions(+), 37 deletions(-)

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2015-02-03 20:21:04 pgsql: Fix breakage in GEODEBUG debug code.
Previous Message Heikki Linnakangas 2015-02-03 12:10:52 pgsql: Refactor page compactifying code.

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Geoghegan 2015-02-03 18:17:25 Re: INSERT ... ON CONFLICT {UPDATE | IGNORE} 2.0
Previous Message Heikki Linnakangas 2015-02-03 17:58:28 Re: PQgetssl() and alternative SSL implementations