From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: netsec 682578f 4/6: Add option to bypass NSM TLS checks on local networks Date: Mon, 16 Jul 2018 21:09:21 +0300 Message-ID: <83in5f833i.fsf@gnu.org> References: <20180714170806.8972.58581@vcs0.savannah.gnu.org> <20180714170809.C3A3920456@vcs0.savannah.gnu.org> <87o9f84t89.fsf@gmail.com> <4C758D1D-7C3A-425A-852F-75E03C779E01@gmail.com> <87va9fs3ro.fsf@gmail.com> <83tvoz8bus.fsf@gnu.org> <87fu0jrvye.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org X-Trace: blaine.gmane.org 1531764437 25240 195.159.176.226 (16 Jul 2018 18:07:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 18:07:17 +0000 (UTC) Cc: emacs-devel@gnu.org To: Robert Pluim Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 20:07:12 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ff7tw-0006UE-Gh for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 20:07:12 +0200 Original-Received: from localhost ([::1]:53114 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff7w3-0001Lp-Be for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 14:09:23 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40784) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff7vw-0001Lj-GD for emacs-devel@gnu.org; Mon, 16 Jul 2018 14:09:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff7vt-0007bG-7o for emacs-devel@gnu.org; Mon, 16 Jul 2018 14:09:16 -0400 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:51210) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff7vt-0007bC-3R; Mon, 16 Jul 2018 14:09:13 -0400 Original-Received: from [176.228.60.248] (port=1653 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1ff7vs-00047H-GL; Mon, 16 Jul 2018 14:09:12 -0400 In-reply-to: <87fu0jrvye.fsf@gmail.com> (message from Robert Pluim on Mon, 16 Jul 2018 18:23:21 +0200) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:227475 Archived-At: > From: Robert Pluim > Cc: emacs-devel@gnu.org > Date: Mon, 16 Jul 2018 18:23:21 +0200 > > > No, you don't need anything special. nt/inc/socket.h redirects > > getaddrinfo into sys_getaddrinfo, and all our C sources see the > > redirection. > > Thanks. I always forget how the nt stuff works. In general, all the sys_* stuff is invisible everywhere except in w32.c. > >> + ret = getaddrinfo (SSDATA (name), NULL, &hints, &res); > > > > You should encode NAME (using ENCODE_SYSTEM), because it could include > > non-ASCII characters. In general, any Lisp string should be encoded > > before you can pass its data to a C library function. > > > > My understanding is that this API only supports ASCII anyway. Then I think we should test that it's either a unibyte string or a string whose size in bytes is equal to its size in characters, and signal an error if that doesn't hold.