]> git.ipfire.org Git - thirdparty/postgresql.git/commit
Fix compilation with OpenSSL 4
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 12 Jun 2026 11:57:22 +0000 (13:57 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 12 Jun 2026 11:57:22 +0000 (13:57 +0200)
commit086652c02f49ca04c3123faf14b2f5cabdf31f7d
treea2f1a43aa66515d17147bb890d066d36685273ca
parenta17f39aa2f5f5867f5e2afc87ec280caa1f65e62
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@yesql.se>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://postgr.es/m/066B07BB-85FA-487C-BE8C-40F791CFC3C4@yesql.se
Backpatch-through: 14
contrib/sslinfo/sslinfo.c
src/backend/libpq/be-secure-openssl.c
src/interfaces/libpq/fe-secure-openssl.c
src/test/ssl/t/001_ssltests.pl