From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.bugs Subject: bug#19284: 25.0.50; tls.el uses option --insecure Date: Wed, 30 Dec 2015 11:38:13 -0500 Organization: =?UTF-8?Q?=D0=A2=D0=B5=D0=BE=D0=B4=D0=BE=D1=80_?= =?UTF-8?Q?=D0=97=D0=BB=D0=B0=D1=82=D0=B0=D0=BD=D0=BE=D0=B2?= @ Cienfuegos Message-ID: <87lh8bzybu.fsf@lifelogs.com> References: <86iohpq3w2.fsf@informationelle-selbstbestimmung-im-internet.de> <87k2o0q5by.fsf@gnus.org> <87k2ny1b8a.fsf@lifelogs.com> <87y4cdvyyr.fsf@violet.siamics.net> <8737uk0zal.fsf@lifelogs.com> <87lh8cvsi6.fsf@violet.siamics.net> 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 1451493565 26498 80.91.229.3 (30 Dec 2015 16:39:25 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 30 Dec 2015 16:39:25 +0000 (UTC) Cc: 19284@debbugs.gnu.org To: Ivan Shmakov Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Dec 30 17:39:14 2015 Return-path: Envelope-to: geb-bug-gnu-emacs@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 1aEJmI-0000xb-C4 for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 17:39:10 +0100 Original-Received: from localhost ([::1]:52984 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEJmH-0003kF-HG for geb-bug-gnu-emacs@m.gmane.org; Wed, 30 Dec 2015 11:39:09 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:40401) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEJmE-0003k3-08 for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 11:39:07 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aEJmA-0007fg-J6 for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 11:39:05 -0500 Original-Received: from debbugs.gnu.org ([208.118.235.43]:42953) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aEJmA-0007fa-BI for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 11:39:02 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84) (envelope-from ) id 1aEJmA-00077d-1V for bug-gnu-emacs@gnu.org; Wed, 30 Dec 2015 11:39:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Ted Zlatanov Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 30 Dec 2015 16:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 19284 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: fixed security Original-Received: via spool by 19284-submit@debbugs.gnu.org id=B19284.145149350227320 (code B ref 19284); Wed, 30 Dec 2015 16:39:01 +0000 Original-Received: (at 19284) by debbugs.gnu.org; 30 Dec 2015 16:38:22 +0000 Original-Received: from localhost ([127.0.0.1]:50555 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEJlW-00076a-7h for submit@debbugs.gnu.org; Wed, 30 Dec 2015 11:38:22 -0500 Original-Received: from mail-qg0-f43.google.com ([209.85.192.43]:33472) by debbugs.gnu.org with esmtp (Exim 4.84) (envelope-from ) id 1aEJlV-00076M-1s for 19284@debbugs.gnu.org; Wed, 30 Dec 2015 11:38:21 -0500 Original-Received: by mail-qg0-f43.google.com with SMTP id b35so56886997qge.0 for <19284@debbugs.gnu.org>; Wed, 30 Dec 2015 08:38:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lifelogs.com; s=google; h=from:to:cc:subject:organization:references:mail-copies-to :gmane-reply-to-list:date:in-reply-to:message-id:user-agent :mime-version:content-type:content-transfer-encoding; bh=92oHaIo82c4OJnnKy4D/6wx6hrrGEK8Qi/k5hLg+LKQ=; b=ASgW12UOIokMDpWZqM5Eae96LlwiKmwo5mAmjZ+vZMbc486QC+4UqjJ7YirJIKwM+L VMaOVd7fB4rWWVAu7iOdkS1HPouobhO0/RnU3603kNGdlGxoYcDp+vN/sIpbkNy8pyBc 2SvIyArNMmlagtKxqZwxKrV4/K1SJPBBLclWo= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:organization:references :mail-copies-to:gmane-reply-to-list:date:in-reply-to:message-id :user-agent:mime-version:content-type:content-transfer-encoding; bh=92oHaIo82c4OJnnKy4D/6wx6hrrGEK8Qi/k5hLg+LKQ=; b=KDRf9nk8Htr/A3v0wGgzufuht9qrVdaIhfNGh8UVR1aPwcIDU2U4LtQc4Xhix2m9Iq sTqLoHxDChg5q1SNxkp6q5ne+c+9//KbIx/s0yI6LVqHvjsXkMtUzGSoXAwVSp0YE8z0 Cfd0d0hEADCl2g7J/tcKsCfvE/j0XL3nKxFnQ7VAwpMXz8/lVExPgVlMsPEsOIe9TUAd ygc9m3tPBVw3xWUIClHorFa5IDsO1Eq2kvSubotRXPaEUbHqfLux/QdXGA9fEOQ3Lfwy yu9LCVWCvpHzpKueAGzTp/AREz88eX3YhFfEXGDreyrJ3pnTj0ieuSSps+C2BbIKcCvE t2Ow== X-Gm-Message-State: ALoCoQnTjMn5Il5HhW8g+301vAUwBC7s2webbm9UkWrjPF0gno+Y4ex6WUHh3OfShQHmw+WZWbaU16OOGcnbqLun9l4ofBPC6g== X-Received: by 10.140.242.216 with SMTP id n207mr90971386qhc.37.1451493495572; Wed, 30 Dec 2015 08:38:15 -0800 (PST) Original-Received: from flea ([98.229.60.157]) by smtp.gmail.com with ESMTPSA id b95sm18384460qge.47.2015.12.30.08.38.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 30 Dec 2015 08:38:14 -0800 (PST) X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6; d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" Mail-Copies-To: never Gmane-Reply-To-List: yes In-Reply-To: <87lh8cvsi6.fsf@violet.siamics.net> (Ivan Shmakov's message of "Wed, 30 Dec 2015 15:57:37 +0000") User-Agent: Gnus/5.130012 (Ma Gnus v0.12) Emacs/25.0.50 (gnu/linux) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:111028 Archived-At: On Wed, 30 Dec 2015 15:57:37 +0000 Ivan Shmakov wrote:=20 >>>>>> "TZ" =3D=3D Ted Zlatanov writes: >>>>>> On Tue, 29 Dec 2015 19:25:48 +0000 Ivan Shmakov w= rote: IS> As long as the hooks are in place to route the requests via that IS> package, I have no (strong) objections to the move. TZ> The package itself will install those hooks, I assume. IS> My point is that there=E2=80=99re no such hooks currently You're right, I meant to say that the hooks will be provided and the package will add itself to them. IS> =E2=80=93 the dispatch is instead hardcoded into IS> network-stream-open-tls: IS> 357 (stream IS> 358 (funcall (if (gnutls-available-p) IS> 359 'open-gnutls-stream IS> 360 'open-tls-stream) IS> 361 name buffer host service)) Yes, this is exactly where the hook or function should go. TZ> There is a user experience difference between relying on external TZ> tools implicitly, which tls.el does, and explicitly, which TZ> ProxyCommand does. IS> But that=E2=80=99s trivial to solve; say: IS> (defcustom network-stream-open-tls-function 'open-gnutls-stream IS> "The function to use to establish TLS/SSL connections." IS> :type '(choice (function-item :tag "Native GnuTLS support" IS> open-gnutls-stream) IS> (function-item :tag "Use gnutls-cli external command" IS> open-tls-stream))) IS> This way, tls.el would only be used if explicitly configured by IS> the user. Exactly, brilliant :) But the user experience goes beyond configuration. External tools are harder to debug and control, and the *user* ends up with the burden of maintaining them (which can have security consequences too). I think if the user *knows* he has chosen a proxy method, he's much more likely to be aware of the burden he assumes. It's also worth considering whether the GnuTLS integration itself can support these use cases. Maybe `open-gnutls-stream-insecurely' would be a good user-level function to provide. TZ> Also, tls.el is not granular like ProxyCommand or the TZ> `nnimap-stream' functionality, it applies to all connectivity. IS> The user may set network-stream-open-tls-function to an entirely IS> arbitrary function, which may take the target host and service IS> names into account. (Although I don=E2=80=99t have any sensible use IS> case for that at hand.) It makes sense in some very specifically constrained corporate environments. It could be handled by making `network-stream-open-tls-function' optionally specify the function by host and port, not just a global choice. Gnus is full of this kind of defcustom. So that makes it fairly easy to configure, I think. The logging in the network-stream code will probably have to be improved as well to support the user experience. I appreciate your thoughts, Ivan, but also anyone else that wants to contribute is welcome... I think this is a very good discussion. Ted