libpq: Fix SNI host handling

Peter Eisentraut <peter@eisentraut.org>

Commit: 37e1cce4ddf0be362e3093cee55493aee41bc423
Author: Peter Eisentraut <peter@eisentraut.org>
Date: 2021-06-08T14:01:05Z
Releases: 14.0
libpq: Fix SNI host handling

Fix handling of NULL host name (possibly by using hostaddr).  It
previously crashed.  Also, we should look at connhost, not pghost, to
handle multi-host specifications.

Also remove an unnecessary SSL_CTX_free().

Reported-by: Jacob Champion <pchampion@vmware.com>
Reviewed-by: Michael Paquier <michael@paquier.xyz>
Discussion: https://www.postgresql.org/message-id/504c276ab6eee000bb23d571ea9b0ced4250774e.camel@vmware.com

Files

PathChange+/−
src/interfaces/libpq/fe-secure-openssl.c modified +15 −11

Discussion

  • SSL SNI 24 messages · 2021-02-15 → 2021-06-08