Re: Serverside SNI support in libpq - Mailing list pgsql-hackers

From Daniel Gustafsson
Subject Re: Serverside SNI support in libpq
Date
Msg-id 0BC5B9B1-6503-4563-AAC6-33DEF264AE3F@yesql.se
Whole thread Raw
In response to Re: Serverside SNI support in libpq  (Jacob Champion <jacob.champion@enterprisedb.com>)
List pgsql-hackers
> On 24 Feb 2025, at 22:51, Jacob Champion <jacob.champion@enterprisedb.com> wrote:
>
> On Wed, Feb 19, 2025 at 3:13 PM Daniel Gustafsson <daniel@yesql.se> wrote:
>> Are there any blockers for getting this in?
>
>> +           SSL_context = ssl_init_context(isServerStart, host);
>
> I'm still not quite following the rationale behind the SSL_context
> assignment. To maybe illustrate, attached are some tests that I
> expected to pass, but don't.
>
> After adding an additional host and reloading the config, the behavior
> of the original fallback host seems to change. Am I misunderstanding
> the designed fallback behavior, have I misdesigned my test, or is this
> a bug?

Thanks for the tests, they did in fact uncover a bug in how fallback was
handled which is now fixed.  In doing so I revamped how the default context
handling is done, it now always use the GUCs in postgresql.conf for
consistency.  The attached v6 rebase contains this as well as your tests as
well as general cleanup and comment writing etc.

--
Daniel Gustafsson


Attachment

pgsql-hackers by date:

Previous
From: Ranier Vilela
Date:
Subject: Re: Small memory fixes for pg_createsubcriber
Next
From: Greg Sabino Mullane
Date:
Subject: Re: Logging which local address was connected to in log_line_prefix