pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: ssl: Don't disable SSL for all hosts when one SNI host fails to
2+ messages / 1 participants
[nested] [flat]

* pgsql: ssl: Don't disable SSL for all hosts when one SNI host fails to
@ 2026-10-26 21:10  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-26 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ssl: Don't disable SSL for all hosts when one SNI host fails to load

On Windows and in EXEC_BACKEND builds every backend reloads the SSL
configuration, with no previous one to fall back on.  If a single
pg_hosts.conf entry failed to load there, the whole configuration was
discarded and the backend ran without SSL for every host.  Fix by
keeping the failed entry without an SSL context in child processes
and failing the handshake only for connections selecting it.

Also document that SSL_passphrase_cmd_reload must be enabled on
Windows, like commit 0f4f45772c5 did for the GUC.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAN4CZFM-Hn7-bdKC8=xwCQiE128Y1Xao+aft=Grq5QA9OkZ9Kw@mail.gmail.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/07be6f384ca7a90c83055da46346e39a0b4d421d

Modified Files
--------------
doc/src/sgml/runtime.sgml             | 10 ++++++++++
src/backend/libpq/be-secure-openssl.c | 24 +++++++++++++++++++++++-
src/test/ssl/t/004_sni.pl             | 32 ++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* pgsql: ssl: Don't disable SSL for all hosts when one SNI host fails to
@ 2026-10-26 21:10  Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Daniel Gustafsson @ 2026-10-26 21:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

ssl: Don't disable SSL for all hosts when one SNI host fails to load

On Windows and in EXEC_BACKEND builds every backend reloads the SSL
configuration, with no previous one to fall back on.  If a single
pg_hosts.conf entry failed to load there, the whole configuration was
discarded and the backend ran without SSL for every host.  Fix by
keeping the failed entry without an SSL context in child processes
and failing the handshake only for connections selecting it.

Also document that SSL_passphrase_cmd_reload must be enabled on
Windows, like commit 0f4f45772c5 did for the GUC.

Author: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Daniel Gustafsson <daniel@yesql.se>
Discussion: https://postgr.es/m/CAN4CZFM-Hn7-bdKC8=xwCQiE128Y1Xao+aft=Grq5QA9OkZ9Kw@mail.gmail.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/9674c91aeb2abbdf3a73f833b3f5ad7e87c5fe77

Modified Files
--------------
doc/src/sgml/runtime.sgml             | 10 ++++++++++
src/backend/libpq/be-secure-openssl.c | 24 +++++++++++++++++++++++-
src/test/ssl/t/004_sni.pl             | 32 ++++++++++++++++++++++++++++++++
3 files changed, 65 insertions(+), 1 deletion(-)



^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2026-10-26 21:10 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-26 21:10 pgsql: ssl: Don't disable SSL for all hosts when one SNI host fails to Daniel Gustafsson <dgustafsson@postgresql.org>
2026-10-26 21:10 pgsql: ssl: Don't disable SSL for all hosts when one SNI host fails to Daniel Gustafsson <dgustafsson@postgresql.org>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox