Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection - Mailing list pgsql-bugs

From Daniel Gustafsson
Subject Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection
Date
Msg-id 998B5B99-3179-4D20-8EAE-E6D3040F6762@yesql.se
Whole thread Raw
In response to 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>)
List pgsql-bugs
> On 29 Sep 2022, at 22:16, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
> I wrote:
>> AFAICS that behavioral change is deliberate: for the single case
>> of inquiring about "library", PQsslAttribute now tells you which
>> SSL implementation libpq *can* use, not which one it's actually
>> using on a given connection.  I'm not sure that this is a great
>> definition, since it's so unlike the behavior for other attributes.

That was the intention of the patch, as different libraries may require
different connstrings there needs to be a way to know the library which will be
use when connecting.

> Actually, wait a minute: both the documentation and the commit
> message claim the new behavior is something different than what it
> actually is.  The intention seems to have been to change the
> behavior only for the conn == NULL case.  So maybe we need to
> fix it as attached.

Hrmpf, yes, I agree with your patch.

>  This'd still be broken for the
> multiple-libraries scenario, but I admit that that's pretty
> hypothetical.

We can cross that bridge if get there, nothing here prevents the case in the
hypothetical future unless I'm missing something.

We still need to change the docs though, maybe along the lines of the below
(but with better wording):

-            Name of the SSL implementation in use. (Currently, only
-            <literal>"OpenSSL"</literal> is implemented)
+            Name of the implementation which will be used for connections
+            using SSL in case <literal>conn</literal> is NULL, or in case
+            <literal>conn</literal> is an SSL enabled connection. If
+            <literal>conn</literal> is a a non-SSL connection NULL is returned.
+            (Currently, only <literal>"OpenSSL"</literal> is implemented)

--
Daniel Gustafsson        https://vmware.com/




pgsql-bugs by date:

Previous
From: Heath Lord
Date:
Subject: Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection
Next
From: Jacob Champion
Date:
Subject: Re: BUG #17625: In PG15 PQsslAttribute returns different values than PG14 when SSL is not in use for the connection