| From: | Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: Fix compilation with OpenSSL 4 |
| Date: | 2026-06-12 12:16:27 |
| Message-ID: | E1wY0oE-0000lw-38@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
Fix compilation with OpenSSL 4
OpenSSL 4.0.0 changed some parameters and returnvalues to const, so
we need to update our declarations and subsequently cast away const-
ness from a few callsites to make libpq build without warnings. This
is tested with OpenSSL 1.1.1 through 4.0.0 as well as with LibreSSL.
No functional change is introduced, this commit only allows postgres
to be compiled against OpenSSL 4.0.0 without warnings.
There is also an errormessage change in OpenSSL 4.0.0 which needed
to be covered by our testharness.
This will be backpatched to all supported branches since they are
all equally likely to be built against OpenSSL 4.0.0 as it becomes
available in distributions. Backpatching will be done once it has
been in master for a few days without issues.
Author: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/066B07BB-85FA-487C-BE8C-40F791CFC3C4@yesql.se
Backpatch-through: 14
Branch
------
REL_14_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/086652c02f49ca04c3123faf14b2f5cabdf31f7d
Modified Files
--------------
contrib/sslinfo/sslinfo.c | 24 ++++++++++++------------
src/backend/libpq/be-secure-openssl.c | 26 +++++++++++++-------------
src/interfaces/libpq/fe-secure-openssl.c | 13 +++++++------
src/test/ssl/t/001_ssltests.pl | 4 ++--
4 files changed, 34 insertions(+), 33 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Álvaro Herrera | 2026-06-12 12:25:21 | pgsql: Fix translatable string construction in psql |
| Previous Message | Daniel Gustafsson | 2026-06-12 12:15:57 | pgsql: Fix compilation with OpenSSL 4 |