| From: | Daniel Gustafsson <dgustafsson(at)postgresql(dot)org> |
|---|---|
| To: | pgsql-committers(at)lists(dot)postgresql(dot)org |
| Subject: | pgsql: libpq: threadsafety for SSL certificate callback |
| Date: | 2025-11-12 11:39:43 |
| Message-ID: | E1vJ9CR-006EHt-0d@gemulon.postgresql.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-committers |
libpq: threadsafety for SSL certificate callback
In order to make the errorhandling code in backend libpq be thread-
safe the global variable used by the certificate verification call-
back need to be replaced with passing private data.
This moves the threadsafety needle a little but forwards, the call
to strerror_r also needs to be replaced with the error buffer made
thread local. This is left as future work for when add the thread
primitives required for this to the tree.
Author: Daniel Gustafsson <daniel(at)yesql(dot)se>
Reviewed-by: Peter Eisentraut <peter(at)eisentraut(dot)org>
Discussion: https://postgr.es/m/353226C7-97A1-4507-A380-36AA92983AE6@yesql.se
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9122ff65a1be0fe4d55a34c6d6f7403209f326aa
Modified Files
--------------
src/backend/libpq/be-secure-openssl.c | 31 ++++++++++++++++++++++++++-----
1 file changed, 26 insertions(+), 5 deletions(-)
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Daniel Gustafsson | 2025-11-12 13:07:14 | pgsql: Fix range for commit_siblings in sample conf |
| Previous Message | Álvaro Herrera | 2025-11-12 11:36:01 | pgsql: Change coding pattern for CURL_IGNORE_DEPRECATION() |