Re: Serverside SNI support in libpq

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Daniel Gustafsson <daniel(at)yesql(dot)se>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Noah Misch <noah(at)leadboat(dot)com>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Subject: Re: Serverside SNI support in libpq
Date: 2026-09-22 10:19:55
Message-ID: CAN4CZFPqjqq--HcmgeDeQ_GPg_XOcb4W6u0ShvoeqpJ1r0U4ag@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

+ /*
+ * If the initialization failed, and the ssl_sni setting was changed, we
+ * need to revert ssl_sni back to the previous setting to match the SSL
+ * configuration left in place. Log a WARNING to alert the user.
+ */
+ if (SSL_hosts->sni_enabled != ssl_sni)
+ {

Won't this cause a different crash without a null check for SSL_hosts?

Also, this seems to be a partial revert only affecting new sessions,
still leaving existing sessions with an incorrect value, that won't be
confusing?

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Maxime Schoemans 2026-09-22 10:24:23 Re: Set calcSumX2 = true in numeric_(poly_)deserialize
Previous Message shveta malik 2026-09-22 10:16:55 Re: Persist slot invalidations before publishing them