pgsql: Enable SSL library detection via PQsslAttribute() - Mailing list pgsql-committers

From Daniel Gustafsson
Subject pgsql: Enable SSL library detection via PQsslAttribute()
Date
Msg-id E1nZAdZ-001toy-NL@gemulon.postgresql.org
Whole thread Raw
List pgsql-committers
Enable SSL library detection via PQsslAttribute()

Currently, libpq client code must have a connection handle
before it can query the "library" SSL attribute.  This poses
problems if the client needs to know what SSL library is in
use before constructing a connection string.

Allow PQsslAttribute(NULL, "library") to return the library
in use -- currently, just "OpenSSL" or NULL. The new behavior
is announced with the LIBPQ_HAS_SSL_LIBRARY_DETECTION feature
macro, allowing clients to differentiate between a libpq that
was compiled without SSL support and a libpq that's just too
old to tell.

Author: Jacob Champion <pchampion@vmware.com>
Reviewed-by: Robert Haas <robertmhaas@gmail.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/4c8b76ef434a96627170a31c3acd33cbfd6e41f1.camel@vmware.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/ebc8b7d4416d8e0dfb7c05132ef6182fd3daf885

Modified Files
--------------
doc/src/sgml/libpq.sgml                  | 10 +++++++++
src/interfaces/libpq/Makefile            |  1 +
src/interfaces/libpq/fe-secure-openssl.c |  6 +++---
src/interfaces/libpq/libpq-fe.h          |  2 ++
src/interfaces/libpq/t/002_api.pl        | 20 +++++++++++++++++
src/interfaces/libpq/test/.gitignore     |  1 +
src/interfaces/libpq/test/Makefile       |  2 +-
src/interfaces/libpq/test/testclient.c   | 37 ++++++++++++++++++++++++++++++++
8 files changed, 75 insertions(+), 4 deletions(-)


pgsql-committers by date:

Previous
From: Peter Eisentraut
Date:
Subject: pgsql: psql: Add test for psql behavior on server crash
Next
From: Daniel Gustafsson
Date:
Subject: pgsql: doc: Make UPDATE FROM examples consistent