]> granicus.if.org Git - postgresql/commit - src/interfaces/libpq/fe-secure.c
Add API functions to libpq to interrogate SSL related stuff.
authorHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 3 Feb 2015 17:57:52 +0000 (19:57 +0200)
committerHeikki Linnakangas <heikki.linnakangas@iki.fi>
Tue, 3 Feb 2015 17:57:52 +0000 (19:57 +0200)
commit91fa7b4719ac583420d9143132ba4ccddefbc5b2
tree63e014f91cb23165532517ffc6794afdb11a710f
parent809d9a260b5d068a6a366273cd724bf9b396b026
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.
doc/src/sgml/libpq.sgml
src/bin/psql/command.c
src/interfaces/libpq/exports.txt
src/interfaces/libpq/fe-secure-openssl.c
src/interfaces/libpq/fe-secure.c
src/interfaces/libpq/libpq-fe.h