From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: jca@wxcvbn.org (=?utf-8?Q?J=C3=A9r=C3=A9mie_Courr=C3=A8ges-Anglas?=) Newsgroups: gmane.emacs.devel Subject: Re: [PATCH] gnutls: Add SNI support Date: Mon, 24 Nov 2014 13:33:23 +0100 Message-ID: <87vbm4ok18.fsf@joy.wxcvbn.org> References: <87wq6k3i99.fsf@toke.dk> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Trace: ger.gmane.org 1416832542 10514 80.91.229.3 (24 Nov 2014 12:35:42 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 24 Nov 2014 12:35:42 +0000 (UTC) Cc: emacs-devel@gnu.org To: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 24 13:35:36 2014 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xssrd-0005V9-OM for ged-emacs-devel@m.gmane.org; Mon, 24 Nov 2014 13:35:33 +0100 Original-Received: from localhost ([::1]:52314 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xssrd-0003Dl-0D for ged-emacs-devel@m.gmane.org; Mon, 24 Nov 2014 07:35:33 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:33825) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XssrT-00039v-8z for emacs-devel@gnu.org; Mon, 24 Nov 2014 07:35:27 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1XssrI-0005Iz-Oq for emacs-devel@gnu.org; Mon, 24 Nov 2014 07:35:23 -0500 Original-Received: from chomsky.autogeree.net ([91.216.110.36]:43786) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XssrH-0005Hn-DD for emacs-devel@gnu.org; Mon, 24 Nov 2014 07:35:12 -0500 Original-Received: from joy.wxcvbn.org (localhost [127.0.0.1]) by wxcvbn.org (8.14.9/8.14.9) with ESMTP id sAOCXOYJ022023; Mon, 24 Nov 2014 13:33:24 +0100 (CET) Original-Received: (from jca@localhost) by joy.wxcvbn.org (8.14.9/8.14.9/Submit) id sAOCXOum015099; Mon, 24 Nov 2014 13:33:24 +0100 (CET) Mail-Followup-To: Toke =?utf-8?Q?H=C3=B8iland-J=C3=B8rgensen?= , emacs-devel@gnu.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (berkeley-unix) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 91.216.110.36 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:178168 Archived-At: Toke H=C3=B8iland-J=C3=B8rgensen 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 --=20 jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE