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

From: Eli Zaretskii <[email-masked]>
Date: Sun, 28 Feb 2016 18:47:41 +0200

> From: Alain Schneble <[email-masked]>
> CC: Eli Zaretskii <[email-masked]>, José L. Doménech
> 	<[email-masked]>, <[email-masked]>
> Date: Sat, 27 Feb 2016 19:05:20 +0100
> 
> Lars Ingebrigtsen <[email-masked]> writes:
> 
> > (setq proc
> > (make-network-process :name "foo"
> > 		      :buffer (get-buffer-create "*foo*")
> > 		      :host "imap.gmail.com"
> > 		      :service 993
> > 		      :nowait t
> > 		      :tls-parameters
> > 		      (cons 'gnutls-x509pki
> > 			    (gnutls-boot-parameters
> > 			     :type 'gnutls-x509pki
> > 			     :hostname "imap.gmail.com"))))
> >
> > * OK Gimap ready for requests from 60.225.211.161 qr7mb410250987iec
> >
> > should appear.  Also, after evaling that, what does
> 
> It seems to be a timing issue.  If I set gnutls-log-level to 5, this
> works also on Windows (i.e i get OK Gimap...).

Actually, with the latest trunk this works even without increasing the
log level.  I guess the latest changes in gnutls.c did it.

> I guess that it enters this path because the socket is not ready yet.
> But why?

Because the connection didn't complete yet, and we are already trying
the GnuTLS handshake.