pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Keep current ssl_sni setting on SSL config reload failure
2+ messages / 1 participants
[nested] [flat]

* pgsql: Keep current ssl_sni setting on SSL config reload failure
@ 2026-10-06 11:52 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

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

Keep current ssl_sni setting on SSL config reload failure

When reloading the SSL configuration fails, the existing config is
left in place to keep the server from being inaccessible.  The GUC
backing SNI, ssl_sni, was however changed.  This could lead to new
connections trying to access non-existing configurations.  Fix by
storing the ssl_sni setting at the time of initialization in the
hosts context and only use the stored value during the handshake.

The patch submitted by the reporter has been significantly reworked
and expanded.  Additional test cases written by Rui Zhao.

Author: Anthropic OSS program
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Co-authored-by: Rui Zhao <zhaorui126@gmail.com>
Reported-by: Anthropic OSS program
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/20260920211619.9c.noahmisch@microsoft.com
Backpatch-through: 19

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/72ffdffd1fcc53d6f950c35fbbe1079fbf9f15f4

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c |  26 +++++-
src/test/ssl/t/004_sni.pl             | 157 +++++++++++++++++++++++++++++++++-
src/test/ssl/t/SSL/Server.pm          |   4 +
3 files changed, 184 insertions(+), 3 deletions(-)



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

* pgsql: Keep current ssl_sni setting on SSL config reload failure
@ 2026-10-06 11:52 Daniel Gustafsson <dgustafsson@postgresql.org>
  0 siblings, 0 replies; 2+ messages in thread

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

Keep current ssl_sni setting on SSL config reload failure

When reloading the SSL configuration fails, the existing config is
left in place to keep the server from being inaccessible.  The GUC
backing SNI, ssl_sni, was however changed.  This could lead to new
connections trying to access non-existing configurations.  Fix by
storing the ssl_sni setting at the time of initialization in the
hosts context and only use the stored value during the handshake.

The patch submitted by the reporter has been significantly reworked
and expanded.  Additional test cases written by Rui Zhao.

Author: Anthropic OSS program
Co-authored-by: Daniel Gustafsson <daniel@yesql.se>
Co-authored-by: Rui Zhao <zhaorui126@gmail.com>
Reported-by: Anthropic OSS program
Reviewed-by: Zsolt Parragi <zsolt.parragi@percona.com>
Reviewed-by: Jacob Champion <jacob.champion@enterprisedb.com>
Reviewed-by: Rui Zhao <zhaorui126@gmail.com>
Discussion: https://postgr.es/m/20260920211619.9c.noahmisch@microsoft.com
Backpatch-through: 19

Branch
------
REL_19_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b6adefc659c70a371d860f5a90160af2c254f357

Modified Files
--------------
src/backend/libpq/be-secure-openssl.c |  26 +++++-
src/test/ssl/t/004_sni.pl             | 157 +++++++++++++++++++++++++++++++++-
src/test/ssl/t/SSL/Server.pm          |   4 +
3 files changed, 184 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2026-10-06 11:52 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2026-10-06 11:52 pgsql: Keep current ssl_sni setting on SSL config reload failure Daniel Gustafsson <dgustafsson@postgresql.org>
2026-10-06 11:52 pgsql: Keep current ssl_sni setting on SSL config reload failure 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