From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Jimmy Yuen Ho Wong 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 16:24:45 +0100 Message-ID: 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> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Trace: blaine.gmane.org 1531754648 16441 195.159.176.226 (16 Jul 2018 15:24:08 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 16 Jul 2018 15:24:08 +0000 (UTC) Cc: Robert Pluim , Emacs-Devel devel To: Eli Zaretskii Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Jul 16 17:24:03 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 1ff5M1-000498-RI for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 17:24:01 +0200 Original-Received: from localhost ([::1]:52374 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5O8-0000Nd-Ks for ged-emacs-devel@m.gmane.org; Mon, 16 Jul 2018 11:26:12 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55406) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ff5N7-0000Kc-3b for emacs-devel@gnu.org; Mon, 16 Jul 2018 11:25:10 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ff5N3-00057m-7U for emacs-devel@gnu.org; Mon, 16 Jul 2018 11:25:09 -0400 Original-Received: from mail-io0-x22b.google.com ([2607:f8b0:4001:c06::22b]:35823) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1ff5N1-00057A-Ew; Mon, 16 Jul 2018 11:25:03 -0400 Original-Received: by mail-io0-x22b.google.com with SMTP id q4-v6so38183803iob.2; Mon, 16 Jul 2018 08:25:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=m/tlJ4+g9L87GzUJIuihCXMB/pM+PdVJbYakZi/ov7o=; b=orqiGZtv+l0UZ6Ry2vi/kHb4H1bRhuehYjaqcWiu262KIC4shkkOA8NCXMzVWHq/DT qWr/FLTd9Y9uKo7xs66E0wjmpOnUhbsCDZQYe5VgQAdvrJ4xQYvizjFJWUQZaTtk7jkC Nf5XfhvB0AiCqgZ0gBhN6tdgLLCzm3+GU4hAHuYgvHWc/tHphATmvCuzUz5AIZd/u40T dg5juZ+1JjkTcWCm9aNMi5hcBIxMPSbZs8YJW7t9oH/vO3abOh2a4GZmlx9Minodrq3Y Qn4famR4Qn00vQMccq7BqYu7ynfYDKmew9BIVXMSB0aJuaI9W6JqmX11utYEW+x0cv9U S2qw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=m/tlJ4+g9L87GzUJIuihCXMB/pM+PdVJbYakZi/ov7o=; b=VrA8qKr+Bqvom+/AVGsXac7oh9asCtwDpwFppEPn+1lW98VC5ySSccyOMUFtjV6Xsc nqAikDxYtBUFh7SPYBBE4Nt7VkatW77Pvz+VtWSVs7L3MlgHksXJefAx5TzsBWrj40UK IqGwdk4tnJyN+JMslJ1nh65V1ZsNEpNdSIzuPG6mIrqwZbff3LQ2bc3h1or4Oe2HLM9p 18A5IeXF4GO5LHqTmKGRAbi/NGpqx1qonZdSOgeqKZyWcPtkrujO0iNU7KOEgNyKqXnx pzBQ4PyrfDUQrB/e1lea5+Xbeo5sUXj9/JfXXvtiyOVnfYhBGtPHPLmUZX4P9lJfrAYh 8xMg== X-Gm-Message-State: AOUpUlEjAQXxBebbiVd1Bb46RzbkhgLIq4Mohyhy2+c/E6Kp+EnmLs9s 42DCSkeytLobtOa+UYmepjgCy+lCgGXYvKtvMA3bGg== X-Google-Smtp-Source: AAOMgpcDOk1nLnaPTpRj4Nt5HNbTK70n+FPgwim8VwiSNnbJvxDDoig1q8BhAirFcfuTTfYQuQtASHY+8UL2OLqFFMQ= X-Received: by 2002:a6b:e008:: with SMTP id z8-v6mr10127551iog.296.1531754702678; Mon, 16 Jul 2018 08:25:02 -0700 (PDT) In-Reply-To: <83tvoz8bus.fsf@gnu.org> X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4001:c06::22b 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:227456 Archived-At: On Mon, Jul 16, 2018 at 4:00 PM Eli Zaretskii wrote: > > > From: Robert Pluim > > Date: Mon, 16 Jul 2018 15:34:35 +0200 > > Cc: emacs-devel@gnu.org > > > > Eli, I see there=CA=BCs a sys_getaddrinfo in w32.c, is something needed > > to get emacs to use that on MS-Windows? > > No, you don't need anything special. nt/inc/socket.h redirects > getaddrinfo into sys_getaddrinfo, and all our C sources see the > redirection. > > > +DEFUN ("get-address-info", Fget_address_info, Sget_address_info, 1, 2,= 0, > > + doc: /* Look up ip address info of NAME. > > +Optional parameter FAMILY controls whether to look up IPv4 or IPv6 > > +addresses. The default of nil means look up both, symbol `ipv4' means > > +IPv4 only, symbol `ipv6' mean IPv6 only. Returns a list of addresses, > > +or nil if none were found. */) > > This doc string doesn't tell that each address is a vector or a > string. > > > + if (EQ (family, Qipv4)) > > + hints.ai_family =3D AF_INET; > > +#ifdef AF_INET6 > > + if (EQ (family, Qipv6)) > > + hints.ai_family =3D AF_INET6; > > +#endif > > Should we signal an error if 'ipv6' is requested on a system that > doesn't support that? > > > + ret =3D 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. > Does getaddrinfo accept unicode hostnames? If not I think we can just make sure NAME is all ASCII as per Punycode for i18nized host names. > Thanks. > > P.S. This needs a NEWS entry, at the very least, and perhaps also an > update for the ELisp manual. >