Subject: bug#16602: 24.3.50; gnutls sometimes errors out

From: Ted Zlatanov <[email-masked]>
Date: Sun, 09 Feb 2014 21:19:43 -0500

On Thu, 30 Jan 2014 16:11:58 -0800 Lars Ingebrigtsen <[email-masked]> wrote: 

LI> If I evaluate the following on my Fedora 19 laptop:

LI> (open-gnutls-stream "news.ycombinator.com" (get-buffer-create "yc")
LI> 		    "news.ycombinator.com" 443)

LI> I often get:

LI> Debugger entered--Lisp error: (gnutls-error #<process news.ycombinator.com> -19)
LI>   signal(gnutls-error (#<process news.ycombinator.com> -19))
LI>   gnutls-negotiate(:process #<process news.ycombinator.com> :type gnutls-x509pki :hostname "news.ycombinator.com")
LI>   open-gnutls-stream("news.ycombinator.com" #<buffer yc> "news.ycombinator.com" 443)

LI> Sometimes it works, and sometimes it fails with this error message.

LI> I get the same thing with a handful of other web sites.  It started
LI> happening last week, I think.

...
LI> gnutls.c: [0] (Emacs) fatal error: An unexpected TLS handshake packet was received.
LI> gnutls.el: (err=[-19] An unexpected TLS handshake packet was received.) boot: (:priority NORMAL :hostname news.ycombinator.com :loglevel 0 :min-prime-bits 256 :trustfiles (/etc/pki/tls/certs/ca-bundle.crt) :crlfiles nil :keylist nil :verify-flags nil :verify-error nil :callbacks nil)

I'm not aware of anything that could be causing this.  I've definitely
not changed anything recently in the GnuTLS integration code.

As a first step, I would check with `gnutls-cli' whether the same
invocation has a similar problem.

Ted