Subject: Re: bug#22789: 25.1.50; In last master build https connections stop working

From: Lars Ingebrigtsen <[email-masked]>
Date: Sat, 27 Feb 2016 13:00:44 +1030

Eli Zaretskii <[email-masked]> writes:

>> So perhaps it's in the TLS code anyway.  Could you try the following
>> code?  It'll make TLS negotiation blocking on WINDOWSNT again.
>
> Now, when I evaluate the same form you posted earlier, I get a lot of
> binary garbage in *foo*, and (process-status proc) yields "failed".

Hm...  interesting...  I think this might point towards
emacs_gnutls_push/pull needing to be tweaked somehow.  (In particular,
the bytes from the stream do not seem to be delivered to the GnuTLS
library, but instead consumed by Emacs (and output into the buffer).)

But it shows that the problem definitely is in the TLS handling itself,
and not in the DNS part of the changes.

Let's see...  Oh, I think I see the problem with the patch I asked you
to test:

#ifdef HAVE_GNUTLS
      if (p->gnutls_p && p->gnutls_state)
	nbytes = emacs_gnutls_read (p, chars + carryover + buffered,
				    readmax - buffered);
      else
#endif
	nbytes = emacs_read (channel, chars + carryover + buffered,
			     readmax - buffered);

So deferring setting g->gnutls_p is not a good idea.  I'll try to debug
this further, but may not have time today...

> Can you post a summary of the changes that you've done, including the
> files and functions where they were made?  That will help Someone™
> look into this problem on Windows.

Uhm.  Well, it was a 3200 line patch that affected process.c and
gnutls.c...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no