Re: Serverside SNI support in libpq - Mailing list pgsql-hackers

From Zsolt Parragi
Subject Re: Serverside SNI support in libpq
Date
Msg-id CAN4CZFPqjqq--HcmgeDeQ_GPg_XOcb4W6u0ShvoeqpJ1r0U4ag@mail.gmail.com
Whole thread
In response to Re: Serverside SNI support in libpq  (Daniel Gustafsson <daniel@yesql.se>)
Responses Re: Serverside SNI support in libpq
List 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?



pgsql-hackers by date:

Previous
From: shveta malik
Date:
Subject: Re: Persist slot invalidations before publishing them
Next
From: Maxime Schoemans
Date:
Subject: Re: Set calcSumX2 = true in numeric_(poly_)deserialize