Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jacob Champion <jchampion@timescale.com>
Cc: heath.lord@crunchydata.com, Daniel Gustafsson <daniel@yesql.se>,
pgsql-bugs@lists.postgresql.org
Date: 2022-09-29T21:08:07Z
Lists: pgsql-bugs
BTW ... while I'm looking at this, it seems like PQsslAttributeNames is defined in a pretty schizophrenic way. It takes a "conn" argument but does nothing whatever with that argument. You get back OpenSSL's attribute list, or an empty attribute list, depending on compilation options but not on the properties of the connection. None of this is explained in the docs, and it would not scale to multiple supported libraries either. Should we clean that up while we're at it? A definition that'd be consistent with what we just agreed to for PQsslAttribute is: PQsslAttributeNames(NULL): the attributes for the default SSL library, or an empty list if there is none. PQsslAttributeNames(conn): the attributes for the SSL library in use on this connection, or an empty list if not encrypted. This doesn't cover how to find out the attributes for a non-default SSL library in advance of using it, but since PQsslAttribute would also need extension for multiple libraries, we could leave that for later. regards, tom lane
Commits
-
Adjust PQsslAttributeNames() to match PQsslAttribute().
- 4e4f7b9fcc9a 16.0 landed
-
doc: Fix PQsslAttribute docs for compression
- f84e2ed246d2 11.18 landed
- d9102e456738 12.13 landed
- a613474411e6 15.0 landed
- a3de685013e7 13.9 landed
- 8fef56229fb4 10.23 landed
- 51fd7cdfd07d 16.0 landed
- 064e1c879dd2 14.6 landed
-
Fix bogus behavior of PQsslAttribute(conn, "library").
- cae4688ce81b 15.0 landed
- 80a05679d5a4 16.0 landed
-
Enable SSL library detection via PQsslAttribute()
- ebc8b7d4416d 15.0 cited