Re: ecdh support causes unnecessary roundtrips

From: Daniel Gustafsson <daniel(at)yesql(dot)se>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Jacob Champion <jacob(dot)champion(at)enterprisedb(dot)com>, PostgreSQL Hackers <pgsql-hackers(at)postgresql(dot)org>, Marko Kreen <markokr(at)gmail(dot)com>, Adrian Klaver <adrian(dot)klaver(at)gmail(dot)com>, Peter Eisentraut <peter_e(at)gmx(dot)net>, Heikki Linnakangas <hlinnaka(at)iki(dot)fi>
Subject: Re: ecdh support causes unnecessary roundtrips
Date: 2026-02-09 19:56:13
Message-ID: 6C3954E3-A927-41CC-8DD4-537CEA4E647B@yesql.se
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

> On 9 Feb 2026, at 20:41, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>
> Daniel Gustafsson <daniel(at)yesql(dot)se> writes:
>> On 18 Mar 2025, at 16:07, Andres Freund <andres(at)anarazel(dot)de> wrote:
>>> Thanks to both of you for fixing this!
>
>> No worries, this has now been committed. Whether or not we can do anything for
>> backbranches is another discussion.
>
> I happened to discover that daa02c6bd causes us to fail on FIPS-mode
> platforms, because X25519 is not a permitted ECDH curve under FIPS.

Ugh, seems I missed testing this with a FIPS enabled setup..

> SSL connection attempts fail with
>
> 2026-02-09 14:29:05.214 EST postmaster[118237] FATAL: could not set group names specified in ssl_groups: passed invalid argument
> 2026-02-09 14:29:05.214 EST postmaster[118237] HINT: Ensure that each group name is spelled correctly and supported by the installed version of OpenSSL.
>
> (This is with OpenSSL 3.0.9 on Fedora 38.)
>
> The reason this eluded detection by the buildfarm is that
> (a) our animals that run on FIPS-mode platforms aren't using
> --enable-tap-tests, and (b) ssl_groups is not validated in any way
> until we try to load it into an SSL context, ie at the moment of
> actually receiving an SSL connection.
>
> I don't object to X25519 being in the default setting, given that it
> seems to be widely used. But I think we had better (1) document that
> you need to remove it if you want to run under FIPS, and (2) fix our
> SSL-using regression tests to not use it. I wonder also if we could
> find a way to validate the ssl_groups setting in a check_hook.

Maybe we can create a lightweight throw-away context in a check hook and ensure
the settings work? Are you hacking on it or do you want me to pick it up?

--
Daniel Gustafsson

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2026-02-09 20:01:09 Re: ecdh support causes unnecessary roundtrips
Previous Message Kirill Reshke 2026-02-09 19:54:27 Re: Buffer locking is special (hints, checksums, AIO writes)