Re: SSL SNI

From: Peter Eisentraut <peter(dot)eisentraut(at)enterprisedb(dot)com>
To: Greg Stark <stark(at)mit(dot)edu>
Cc: Matthias van de Meent <boekewurm+postgres(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: SSL SNI
Date: 2021-03-18 08:31:24
Message-ID: 181baf04-8a17-f8a8-cdfc-4d1b1d63e0d9@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
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.

In response to

Responses

  • Re: SSL SNI at 2021-03-18 08:48:57 from Magnus Hagander

Browse pgsql-hackers by date

  From Date Subject
Next Message Drouvot, Bertrand 2021-03-18 08:33:45 Re: Minimal logical decoding on standbys
Previous Message Kyotaro Horiguchi 2021-03-18 08:30:05 Re: libpq debug log