Fix sslsni connparam boolean check
authorDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 13 Aug 2021 08:32:16 +0000 (10:32 +0200)
committerDaniel Gustafsson <dgustafsson@postgresql.org>
Fri, 13 Aug 2021 08:32:16 +0000 (10:32 +0200)
commitffff00a3556734f859f375b8c76c89f1d2920bcd
treee6232f36617b91655a7d489f0b90d1a20abdcc64
parentdc23c77d07af086574124ea5ca65acf9360b8691
Fix sslsni connparam boolean check

The check for sslsni only checked for existence of the parameter
but not for the actual value of the param.  This meant that the
SNI extension was always turned on.  Fix by inspecting the value
of sslsni and only activate the SNI extension iff sslsni has been
enabled.  Also update the docs to be more in line with how other
boolean params are documented.

Backpatch to 14 where sslsni was first implemented.

Reviewed-by: Tom Lane
Backpatch-through: 14, where sslni was added
doc/src/sgml/libpq.sgml
src/interfaces/libpq/fe-secure-openssl.c