GNU bug report logs - #36660
27.0.50; :nowait fails when failing over when using TLS

Previous Next

Package: emacs;

Reported by: Robert Pluim <rpluim <at> gmail.com>

Date: Mon, 15 Jul 2019 10:58:02 UTC

Severity: normal

Tags: fixed

Found in version 27.0.50

Fixed in version 27.1

Done: Lars Ingebrigtsen <larsi <at> gnus.org>

Bug is archived. No further changes may be made.

Full log


Message #6 received at 36660 <at> debbugs.gnu.org (full text, mbox):

From: Robert Pluim <rpluim <at> gmail.com>
To: 36660 <at> debbugs.gnu.org
Subject: Re: bug#36660: 27.0.50; :nowait fails when failing over when using TLS
Date: Mon, 15 Jul 2019 13:10:01 +0200
[Message part 1 (text/plain, inline)]
O frabjous day! What a bug number :-)

[0001-Don-t-delete-GnuTLS-boot-parameters-too-early.patch (text/x-patch, inline)]
From cfd2d8cbadc3c2b744e40c47cdce4344da1eef77 Mon Sep 17 00:00:00 2001
From: Robert Pluim <rpluim <at> gmail.com>
Date: Mon, 15 Jul 2019 13:04:59 +0200
Subject: [PATCH] Don't delete GnuTLS boot parameters too early
To: emacs-devel <at> gnu.org

When falling back from one IP address to another for the same host, we
need to keep the TLS boot parameters around until we've actually
managed to connect, otherwise the fallback connection(s) will use TCP
rather than TLS.  (Bug#36660)

* src/process.c (connect_network_socket): Don't delete the GnuTLS
boot parameters until after we've managed to connect at the IP
level.
---
 src/process.c | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/src/process.c b/src/process.c
index cab390c10c..23c9be2b7b 100644
--- a/src/process.c
+++ b/src/process.c
@@ -3682,11 +3682,14 @@ connect_network_socket (Lisp_Object proc, Lisp_Object addrinfos,
       Lisp_Object boot, params = p->gnutls_boot_parameters;
 
       boot = Fgnutls_boot (proc, XCAR (params), XCDR (params));
-      p->gnutls_boot_parameters = Qnil;
 
       if (p->gnutls_initstage == GNUTLS_STAGE_READY)
+        {
 	/* Run sentinels, etc. */
+          p->gnutls_boot_parameters = Qnil;
+
 	finish_after_tls_connection (proc);
+        }
       else if (p->gnutls_initstage != GNUTLS_STAGE_HANDSHAKE_TRIED)
 	{
 	  deactivate_process (proc);
-- 
2.21.0.419.gffac537e6c


This bug report was last modified 5 years and 308 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.