From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.devel Subject: Re: [PATCH RFC] GnuTLS: Support TOFU certificate checking. Date: Wed, 08 Oct 2014 16:03:48 +0300 Message-ID: <83d2a2k91n.fsf@gnu.org> References: <1412716565-7786-1-git-send-email-toke@toke.dk> <87a957o87z.fsf@alrua-karlstad.karlstad.toke.dk> <87bnpm2249.fsf@toke.dk> <83eguik9ip.fsf@gnu.org> Reply-To: Eli Zaretskii NNTP-Posting-Host: plane.gmane.org X-Trace: ger.gmane.org 1412773437 21802 80.91.229.3 (8 Oct 2014 13:03:57 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 8 Oct 2014 13:03:57 +0000 (UTC) Cc: tzz@lifelogs.com, toke@toke.dk, emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed Oct 08 15:03:50 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 1XbquD-0001lC-Uo for ged-emacs-devel@m.gmane.org; Wed, 08 Oct 2014 15:03:50 +0200 Original-Received: from localhost ([::1]:36074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1XbquD-0005Tm-ER for ged-emacs-devel@m.gmane.org; Wed, 08 Oct 2014 09:03:49 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49738) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbqu6-0005Td-SD for emacs-devel@gnu.org; Wed, 08 Oct 2014 09:03:47 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xbqu1-0005KN-RD for emacs-devel@gnu.org; Wed, 08 Oct 2014 09:03:42 -0400 Original-Received: from mtaout25.012.net.il ([80.179.55.181]:49157) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xbqu1-0005K2-J3 for emacs-devel@gnu.org; Wed, 08 Oct 2014 09:03:37 -0400 Original-Received: from conversion-daemon.mtaout25.012.net.il by mtaout25.012.net.il (HyperSendmail v2007.08) id <0ND400L00MM0E000@mtaout25.012.net.il> for emacs-devel@gnu.org; Wed, 08 Oct 2014 15:58:47 +0300 (IDT) Original-Received: from HOME-C4E4A596F7 ([87.69.4.28]) by mtaout25.012.net.il (HyperSendmail v2007.08) with ESMTPA id <0ND400B12MPZ8HA0@mtaout25.012.net.il>; Wed, 08 Oct 2014 15:58:47 +0300 (IDT) In-reply-to: X-012-Sender: halo1@inter.net.il X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-Received-From: 80.179.55.181 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:175120 Archived-At: > From: Lars Magne Ingebrigtsen > Cc: toke@toke.dk, tzz@lifelogs.com, emacs-devel@gnu.org > Date: Wed, 08 Oct 2014 14:56:42 +0200 > > Eli Zaretskii writes: > > >> > Right, so (just to make sure I'm understanding you right), what you > >> > propose is to get rid of all the current validation logic in C (i.e the > >> > erroring out) and just return something like ( >> > hostname> ) -- and then make the lisp code work out > >> > the rest? > >> > >> Yup, I think that would be more flexible. > > > > I don't see how this could be done: the initialization of TLS network > > stream creates a descriptor and adds it to the descriptors we watch in > > wait_reading_process_output. If that descriptor is invalid, we will > > likely crash. > > It would still need to return a file descriptor, but would have extra > accessors for accessing the certificate stuff. How can it return a valid descriptor without all the validations it does before that, which (AFAIU) you want to delegate to Lisp now? Apologies if I misunderstand your plan.