postgresql/src
Daniel Gustafsson 5f00ef065e Set SNI ClientHello extension to localhost in tests
The connection strings in the SSL client tests were using the host
set up from Cluster.pm which is a temporary pathname. When SNI is
enabled we pass the host to OpenSSL in order to set the server name
indication ClientHello extension via SSL_set_tlsext_host_name.

OpenSSL doesn't validate the hostname apart from checking the max
length, but LibreSSL checks for RFC 5890 conformance which results
in errors during testing as the pathname from Cluster.pm is not a
valid hostname.

Fix by setting the host explicitly to localhost, as that's closer
to the intent of the test.

Backpatch through 14 where SNI support came in.

Reported-by: Nazir Bilal Yavuz <byavuz81@gmail.com>
Reviewed-by: Tom Lane <tgl@sss.pgh.pa.us>
Discussion: https://postgr.es/m/17391-304f81bcf724b58b@postgresql.org
Backpatch-through: 14
2022-02-10 14:23:36 +01:00
..
backend Test honestly for <sys/signalfd.h>. 2022-02-09 14:24:55 -05:00
bin Translation updates 2022-02-07 13:31:57 +01:00
common Revert error handling improvements for cryptohashes 2022-01-14 11:25:39 +09:00
fe_utils Avoid calling gettext() in signal handlers. 2022-01-17 13:30:04 -05:00
include Test honestly for <sys/signalfd.h>. 2022-02-09 14:24:55 -05:00
interfaces Translation updates 2022-02-07 13:31:57 +01:00
makefiles Add NO_INSTALL option to pgxs 2021-05-27 13:58:29 +02:00
pl Remove ppport.h's broken re-implementation of eval_pv(). 2022-02-08 19:26:09 -05:00
port Fix compatibility thinko for fstat() on standard streams in win32stat.c 2021-11-30 09:55:56 +09:00
template Further tweaking of PG_SYSROOT heuristics for macOS. 2021-01-20 12:07:23 -05:00
test Set SNI ClientHello extension to localhost in tests 2022-02-10 14:23:36 +01:00
timezone Update time zone data files to tzdata release 2021e. 2021-10-29 11:38:32 -04:00
tools Test honestly for <sys/signalfd.h>. 2022-02-09 14:24:55 -05:00
tutorial doc: Prefer explicit JOIN syntax over old implicit syntax in tutorial 2021-04-08 10:51:26 +02:00
.gitignore
DEVELOPERS
Makefile Remove the option to build thread_test.c outside configure. 2020-10-21 12:08:48 -04:00
Makefile.global.in Add module build directory to the PATH for TAP tests 2021-10-22 09:50:16 -04:00
Makefile.shlib AIX: Fix missing libpq symbols by respecting SHLIB_EXPORTS. 2021-09-06 11:28:02 -07:00
nls-global.mk Add errhint_plural() function and make use of it 2021-03-31 09:16:25 +02:00