Enable SSL library detection via PQsslAttribute()
Daniel Gustafsson <dgustafsson@postgresql.org>
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
Files
| Path | Change | +/− |
|---|---|---|
| doc/src/sgml/libpq.sgml | modified | +10 −0 |
| src/interfaces/libpq/fe-secure-openssl.c | modified | +3 −3 |
| src/interfaces/libpq/libpq-fe.h | modified | +2 −0 |
| src/interfaces/libpq/Makefile | modified | +1 −0 |
| src/interfaces/libpq/t/002_api.pl | added | +20 −0 |
| src/interfaces/libpq/test/.gitignore | modified | +1 −0 |
| src/interfaces/libpq/test/Makefile | modified | +1 −1 |
| src/interfaces/libpq/test/testclient.c | added | +37 −0 |
Documentation touched
Discussion
- [PATCH] Enable SSL library detection via PQsslAttribute 12 messages · 2022-02-23 → 2022-03-29