Re: SSL SNI - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: SSL SNI
Date
Msg-id 181baf04-8a17-f8a8-cdfc-4d1b1d63e0d9@enterprisedb.com
Whole thread Raw
In response to SSL SNI  (Peter Eisentraut <peter.eisentraut@enterprisedb.com>)
Responses Re: SSL SNI  (Magnus Hagander <magnus@hagander.net>)
List 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.



pgsql-hackers by date:

Previous
From: Kyotaro Horiguchi
Date:
Subject: Re: libpq debug log
Next
From: "Drouvot, Bertrand"
Date:
Subject: Re: Minimal logical decoding on standbys