pgsql: Use explicit fetching of digests in channel binding (OpenSSL >=

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: pgsql-committers(at)lists(dot)postgresql(dot)org
Subject: pgsql: Use explicit fetching of digests in channel binding (OpenSSL >=
Date: 2026-08-13 22:37:22
Message-ID: E1wue37-00000000T6J-20MC@gemulon.postgresql.org
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-committers

Use explicit fetching of digests in channel binding (OpenSSL >= 3.0)

This commit touches both the libpq and backend-side code of channel
binding where respectively pgtls_get_peer_certificate_hash() and
be_tls_get_certificate_hash() are upgraded to retrieve digests using the
method recommended by OpenSSL 3.0: no more direct EVP_sha256() or
similar, just a EVP_MD_fetch() through EVP to get an algorythm type,
based on a name.

The pre-3.0 code is still required for LibreSSL and as long as we
support OpenSSL 1.1.1.

Similar work has been done in b91f79cd08ab and 1f3b9bb109b8.

Author: Mark Atwood <mark(at)reviewcommit(dot)com>
Co-authored-by: Michael Paquier <michael(at)paquier(dot)xyz>
Discussion: https://postgr.es/m/178596055149.1584250.13974609482797470185@reviewcommit.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/28995f051e72a1efae0e85d0ea43f80c38166657

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 34 ++++++++++++++++++++++++++++
src/interfaces/libpq/fe-secure-openssl.c | 38 ++++++++++++++++++++++++++++++++
2 files changed, 72 insertions(+)

Browse pgsql-committers by date

  From Date Subject
Next Message Michael Paquier 2026-08-14 00:08:16 pgsql: Refactor PgStat_TableStatus to new PgStat_RelationStatus
Previous Message Tomas Vondra 2026-08-13 22:22:57 Re: pgsql: Change wal_compression=on to the first of zstd, lz4, pglz