From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Simon Josefsson Newsgroups: gmane.emacs.devel Subject: Re: url-retrieve-synchronously randomly fails on https URLs (patch included) Date: Mon, 05 Nov 2007 11:26:46 +0100 Message-ID: <87tzo12djt.fsf@mocca.josefsson.org> References: <20071027104716.E9BA773545@tanja.localdomain> <1c34ba170710280540g5b2a9983o33abfcba2843d95@mail.gmail.com> <1c34ba170710291348v36cb5b83ybbb4a7f988f486b1@mail.gmail.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1194258427 23561 80.91.229.12 (5 Nov 2007 10:27:07 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 5 Nov 2007 10:27:07 +0000 (UTC) Cc: emacs-devel@gnu.org To: rms@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Mon Nov 05 11:27:11 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IozAj-0000sD-KA for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 11:27:09 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IozAY-0007l3-Mp for ged-emacs-devel@m.gmane.org; Mon, 05 Nov 2007 05:26:58 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IozAU-0007iK-VT for emacs-devel@gnu.org; Mon, 05 Nov 2007 05:26:55 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IozAU-0007h3-9M for emacs-devel@gnu.org; Mon, 05 Nov 2007 05:26:54 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IozAU-0007gc-2t for emacs-devel@gnu.org; Mon, 05 Nov 2007 05:26:54 -0500 Original-Received: from yxa.extundo.com ([83.241.177.38]) by monty-python.gnu.org with esmtps (TLS-1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1IozAR-0001pw-0m; Mon, 05 Nov 2007 05:26:51 -0500 Original-Received: from mocca.josefsson.org (yxa.extundo.com [83.241.177.38]) (authenticated bits=0) by yxa.extundo.com (8.13.4/8.13.4/Debian-3sarge3) with ESMTP id lA5AQk86027510 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 5 Nov 2007 11:26:46 +0100 OpenPGP: id=B565716F; url=http://josefsson.org/key.txt X-Hashcash: 1:22:071105:rms@gnu.org::MZx+p5g2U3rBs/Fp:8Sxj X-Hashcash: 1:22:071105:emacs-devel@gnu.org::J0caIhVoyqVEHuFi:DPCI In-Reply-To: (Richard Stallman's message of "Fri, 02 Nov 2007 11:02:42 -0400") User-Agent: Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) X-Virus-Scanned: ClamAV version 0.88.2, clamav-milter version 0.88.2 on yxa.extundo.com X-Virus-Status: Clean X-detected-kernel: by monty-python.gnu.org: Linux 2.6, seldom 2.4 (older, 4) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:82563 Archived-At: Richard Stallman writes: > Simon, would you please add comments near the code in GNUtls that > outputs these messages, telling people to watch out for the need for > Emacs to detect the last part of the messages? Done, the GnuTLS code now contains: /* Warning! Do not touch this text string, it is used by external programs to search for when gnutls-cli has reached this point. */ printf ("\n- Simple Client Mode:\n\n"); etc > + ;; `gnutls` regexp > + (sequence > + ;; see src/cli.c lines 721-- > + (sequence line-start "- Simple Client Mode:\n") > + (zero-or-more > + (or > + "\n" ; ignore blank lines > + ;; XXX: we have no way of knowing if the STARTTLS handshake > + ;; sequence has completed successfully, because `gnutls` will > + ;; only report failure. > + (sequence line-start "\*\*\* Starting TLS handshake\n")))))) I also installed the following patch, because I think the above comment was incorrect. /Simon Index: lisp/ChangeLog =================================================================== RCS file: /sources/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.12157 diff -u -p -r1.12157 ChangeLog --- lisp/ChangeLog 5 Nov 2007 09:06:25 -0000 1.12157 +++ lisp/ChangeLog 5 Nov 2007 10:25:21 -0000 @@ -1,3 +1,7 @@ +2007-11-05 Simon Josefsson + + * net/tls.el (tls-end-of-info): Doc fix. + 2007-11-05 Kenichi Handa * international/utf-7.el (utf-7-imap): New coding system. Index: lisp/net/tls.el =================================================================== RCS file: /sources/emacs/emacs/lisp/net/tls.el,v retrieving revision 1.21 diff -u -p -r1.21 tls.el --- lisp/net/tls.el 4 Nov 2007 01:25:49 -0000 1.21 +++ lisp/net/tls.el 5 Nov 2007 10:25:21 -0000 @@ -65,9 +65,9 @@ ;; `gnutls' regexp. See src/cli.c lines 721-. "^- Simple Client Mode:\n" "\\(\n\\|" ; ignore blank lines - ;; XXX: We have no way of knowing if the STARTTLS handshake sequence - ;; has completed successfully, because `gnutls' will only report - ;; failure. + ;; According to src/cli.c lines 640-650 and 705-715 the handshake + ;; will start after this message. If the handshake fails, the + ;; programs will abort. "^\\*\\*\\* Starting TLS handshake\n\\)*" "\\)") "Regexp matching end of TLS client informational messages.