From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.devel Subject: Re: Merge issues in `tls.el' (EMACS_22_BASE vs. trunk) Date: Sat, 01 Mar 2008 18:38:15 -0500 Message-ID: <13zltiauc8.fsf@fencepost.gnu.org> References: NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1204414711 21714 80.91.229.12 (1 Mar 2008 23:38:31 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 1 Mar 2008 23:38:31 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Mar 02 00:38:56 2008 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 1JVbI6-0006os-QJ for ged-emacs-devel@m.gmane.org; Sun, 02 Mar 2008 00:38:55 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVbHa-00084B-4L for ged-emacs-devel@m.gmane.org; Sat, 01 Mar 2008 18:38:22 -0500 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1JVbHV-00082v-GQ for emacs-devel@gnu.org; Sat, 01 Mar 2008 18:38:17 -0500 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1JVbHU-00081g-0r for emacs-devel@gnu.org; Sat, 01 Mar 2008 18:38:17 -0500 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1JVbHT-00081d-Rk for emacs-devel@gnu.org; Sat, 01 Mar 2008 18:38:15 -0500 Original-Received: from fencepost.gnu.org ([140.186.70.10]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1JVbHT-0002T4-IT for emacs-devel@gnu.org; Sat, 01 Mar 2008 18:38:15 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.67) (envelope-from ) id 1JVbHT-0004Vm-8e; Sat, 01 Mar 2008 18:38:15 -0500 X-Spook: Islam Abduganievich Karimov embassy PGP enigma kilderkin X-Ran: {~l3Oq}m{m!WO`?S2zqwL2]TUt1Ni%=E,NN?1FPH>[j.9^k&Dtzmdy/;`y!" (Reiner Steib's message of "Sat, 01 Mar 2008 23:40:51 +0100") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) 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:91021 Archived-At: Reiner Steib wrote: > it seems that something went wrong when syncing Emacs_22 and the trunk > in `tls.el': No, something went wrong syncing gnus trunk to emacs trunk. :) Anyway, well spotted. > - EMACS_22_BASE should not use `rx'. (The log of revision 1.27 says > "Revert merge that re-required rx."). There's no problem there. > - In the trunk, `tls-end-of-info' is defcustomed, but not used at all. > It is used in `open-tls-stream' in EMACS_22_BASE. The 2007-12-05 changes of Elias Oltmanns to open-tls-stream seem to have clobbered the 2007-11-04 changes of Riccardo Murri. Does this patch look ok? *** tls.el.~1.30.~ 2008-02-28 20:00:45.000000000 -0800 --- tls.el 2008-03-01 15:35:48.000000000 -0800 *************** *** 244,259 **** (sit-for 1))) (message "Opening TLS connection with `%s'...%s" cmd (if done "done" "failed")) ! (if done ! (setq done process) ! (delete-process process)))) ! (when done (save-excursion ! (set-buffer buffer) ! (when (or (and tls-checktrust ! (progn (goto-char (point-min)) (re-search-forward tls-untrusted nil t)) (or --- 244,272 ---- (sit-for 1))) (message "Opening TLS connection with `%s'...%s" cmd (if done "done" "failed")) ! (if (not done) ! (delete-process process) ! ;; advance point to after all informational messages that ! ;; `openssl s_client' and `gnutls' print ! (let ((start-of-data nil)) ! (while ! (not (setq start-of-data ! ;; the string matching `tls-end-of-info' ! ;; might come in separate chunks from ! ;; `accept-process-output', so start the ! ;; search where `tls-success' ended (save-excursion ! (if (re-search-forward tls-end-of-info nil t) ! (match-end 0))))) ! (accept-process-output process 1)) ! (if start-of-data ! ;; move point to start of client data ! (goto-char start-of-data))) ! (setq done process)))) ! (when (and done (or (and tls-checktrust ! (save-excursion (goto-char (point-min)) (re-search-forward tls-untrusted nil t)) (or *************** *** 262,276 **** (not (yes-or-no-p (format "The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) (and tls-hostmismatch ! (progn (goto-char (point-min)) (re-search-forward tls-hostmismatch nil t)) (not (yes-or-no-p ! (format "Host name in certificate doesn't match `%s'. Connect anyway? " host))))) (setq done nil) ! (delete-process process)))) (message "Opening TLS connection to `%s'...%s" ! host (if done "done" "failed"))) (when use-temp-buffer (if done (set-process-buffer process nil)) (kill-buffer buffer)) --- 275,289 ---- (not (yes-or-no-p (format "The certificate presented by `%s' is NOT trusted. Accept anyway? " host))))) (and tls-hostmismatch ! (save-excursion (goto-char (point-min)) (re-search-forward tls-hostmismatch nil t)) (not (yes-or-no-p ! (format "Host name in certificate doesn't match `%s'. Connect anyway? " host)))))) (setq done nil) ! (delete-process process))) (message "Opening TLS connection to `%s'...%s" ! host (if done "done" "failed")) (when use-temp-buffer (if done (set-process-buffer process nil)) (kill-buffer buffer))