From: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> |
---|---|
To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
Subject: | pgsql: Cope with a deficiency in OpenSSL 3.x's error reporting. |
Date: | 2024-03-08 00:38:29 |
Message-ID: | [email protected] |
Views: | Whole Thread | Raw Message | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-committers |
Cope with a deficiency in OpenSSL 3.x's error reporting.
In OpenSSL 3.0.0 and later, ERR_reason_error_string randomly refuses
to provide a string for error codes representing system errno values
(e.g., "No such file or directory"). There is a poorly-documented way
to extract the errno from the SSL error code in this case, so do that
and apply strerror, rather than falling back to reporting the error
code's numeric value as we were previously doing.
Problem reported by David Zhang, although this is not his proposed
patch; it's instead based on a suggestion from Heikki Linnakangas.
Back-patch to all supported branches, since any of them are likely
to be used with recent OpenSSL.
Discussion: https://postgr.es/m/[email protected]
Branch
------
REL_15_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0fe82e45cbedbe840f00d834cc6cae55593ef8cf
Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 19 ++++++++++++++++---
src/interfaces/libpq/fe-secure-openssl.c | 23 ++++++++++++++++++++---
2 files changed, 36 insertions(+), 6 deletions(-)
From | Date | Subject | |
---|---|---|---|
Next Message | John Naylor | 2024-03-08 00:47:52 | Re: pgsql: Add template for adaptive radix tree |
Previous Message | Michael Paquier | 2024-03-08 00:33:38 | pgsql: Add support for DEFAULT in ALTER TABLE .. SET ACCESS METHOD |