Re: SSL SNI
Peter Eisentraut <peter.eisentraut@enterprisedb.com>
From: Peter Eisentraut <peter.eisentraut@enterprisedb.com>
To: Greg Stark <stark@mit.edu>
Cc: Matthias van de Meent <boekewurm+postgres@gmail.com>,
pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2021-03-18T08:31:24Z
Lists: pgsql-hackers
On 26.02.21 23:27, Greg Stark wrote:
>> Do you mean the IPv6 detection code is not correct? What is the problem?
>
> This bit, will recognize ipv4 addresses but not ipv6 addresses:
>
> + /*
> + * Set Server Name Indication (SNI), but not if it's a literal IP address.
> + * (RFC 6066)
> + */
> + if (!(strspn(conn->pghost, "0123456789.") == strlen(conn->pghost) ||
> + strchr(conn->pghost, ':')))
> + {
The colon should recognize an IPv6 address, unless I'm not thinking
straight.
Commits
-
libpq: Fix SNI host handling
- 37e1cce4ddf0 14.0 landed
-
libpq: Set Server Name Indication (SNI) for SSL connections
- 5c55dc8b4733 14.0 landed