[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH] gnutls: Add SNI support
From: |
Jérémie Courrèges-Anglas |
Subject: |
Re: [PATCH] gnutls: Add SNI support |
Date: |
Mon, 24 Nov 2014 13:33:23 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) |
Toke Høiland-Jørgensen <address@hidden> writes:
[...]
> Oh, and there's a bit of a hack in trying to detect whether the hostname
> is an IPv4 or IPv6 literal (in which case the hostname shouldn't be
> included in the handshake). Not sure if omitting that check entirely
> will work, or if there's a better way to detect this case.
Better not omit the check. The common trick is to use inet_pton(3) to
see if the param can be converted into an address. Now this raises
portability issues, which may be solved by the inet_pton gnulib
module[1].
[1] https://www.gnu.org/software/gnulib/manual/html_node/inet_005fpton.html
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE