PostgreSQL and OpenSSL 4.0.0
Daniel Gustafsson <daniel@yesql.se>
From: Daniel Gustafsson <daniel@yesql.se>
To: PostgreSQL-development <pgsql-hackers@lists.postgresql.org>
Date: 2026-04-16T13:32:54Z
Lists: pgsql-hackers
Attachments
- 0001-ssl-Declare-variables-const-as-per-OpenSSL-4-API-upd.patch (application/octet-stream) patch 0001
With OpenSSL 4.0.0 shipping GA a few days ago I tried compiling PostgreSQL against it and run the tests. Unsurpisingly the test pass just fine and it compiles without error since they aren't removing any API's we use (they are deprecating more APIs we use, more on that in later threads). There are however a number of warnings since they changed constness on a number of API's. Sadly, just adopting const cause similar warnings on OpenSSL 1.1.1 and LibreSSL so we need to do uglier tricks with casting away constness. The attached patch, while not pretty, allows libpq and sslinfo to build without warnings on OpenSSL 1.1.1 through 4.0.0 as well as on LibreSSL (and there is quite some variability in constness across all these API versions). -- Daniel Gustafsson
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Fix compilation with OpenSSL 4
- fb8befa7b570 16 (unreleased) landed
- c7f70fa1b58d 15 (unreleased) landed
- 8bcabfccea32 17 (unreleased) landed
- 27cf3b5aff4f 18 (unreleased) landed
- 086652c02f49 14 (unreleased) landed
- 89d243d52189 19 (unreleased) landed