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 <[email protected]>
Co-authored-by: Michael Paquier <[email protected]>
Discussion: 
https://postgr.es/m/[email protected]

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(+)

Reply via email to