From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Magnus Henoch Newsgroups: gmane.emacs.devel Subject: Re: TLS problem: gnutls-e-again Date: Sat, 05 Mar 2016 19:05:25 +0000 Message-ID: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit X-Trace: ger.gmane.org 1457204759 2799 80.91.229.3 (5 Mar 2016 19:05:59 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sat, 5 Mar 2016 19:05:59 +0000 (UTC) Cc: emacs-devel@gnu.org To: Lars Magne Ingebrigtsen Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Mar 05 20:05:58 2016 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1acHWS-0000Dc-TD for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 20:05:53 +0100 Original-Received: from localhost ([::1]:47765 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acHWO-00013O-Tw for ged-emacs-devel@m.gmane.org; Sat, 05 Mar 2016 14:05:48 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:55016) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acHW9-00013C-Jj for emacs-devel@gnu.org; Sat, 05 Mar 2016 14:05:35 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1acHW4-0006II-V0 for emacs-devel@gnu.org; Sat, 05 Mar 2016 14:05:33 -0500 Original-Received: from mail-wm0-x230.google.com ([2a00:1450:400c:c09::230]:38534) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1acHW4-0006IE-NW for emacs-devel@gnu.org; Sat, 05 Mar 2016 14:05:28 -0500 Original-Received: by mail-wm0-x230.google.com with SMTP id l68so27578874wml.1 for ; Sat, 05 Mar 2016 11:05:28 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=4NHWW1mIo+3MoN1LgptBr+GGZ3UmdxWe5LOG0/kJt/w=; b=cBdm+0LL8yGNp+Xeqr8qORZTDWkb2e9eJZcatTPb8FwHyPgTAyvoAKvR8g7tzgnAu1 YWMm2IsfxtOrU8+E5HXdK3CGskWjZO+OSkv8ezDny8fCv3y0PR4ES7oq8Kal50+Ij9Qa LZjiacyFVFnBt036PITm8FBSBF+h8znmZ9hh+9nToch0f7nAu3V5NhhIWJZI+8QDFXBg y3askZJtaLGdVWe0qIL4H8c+DgbzSfW4xaVHs6I1XwDih5H1pkU4JDgxZjefa8BFTJvh XzcGJ10vGqQOWHmEoxZJJmFRopXMSx6Xn8l+Cj00SZqRtegg7WfY3gFKtLqj71kYRwYg eXJA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:in-reply-to:message-id :mime-version:content-transfer-encoding; bh=4NHWW1mIo+3MoN1LgptBr+GGZ3UmdxWe5LOG0/kJt/w=; b=c8Fr2l46f/bQBtCOU6ihFLjEJNafagSWWkDKbYoW7DGTi9dXF7I9Bidkg7qf2rrFB2 JxpXIGfk2z8OsirF1COl0t9/6lZ7E5wiFXVS+12Ft0erH98+TCWoZev/dSJ1Pd2UEatG 8HjqpMQ5wl+Mvsuc8YKAyqWFl7IjKhJ6LoGt7xZoQIOdHaAHf6nJSmrobl7P7shOIJaq u4xUdN3JEpQLRx7+TuUyiTRdyG6urgorcxgvrklanEvgmtFq4Mgi2UQ89++U29frVOs5 BSXYdek5gvzEBRHr07WVnJWRpXDGHf2BmbiYg7tMUNep3tLFUw0UX981OEzKMILUQSeZ QKcA== X-Gm-Message-State: AD7BkJLiaj6nDeI9WMhPvSHhWB+cy+3f+z/fzJSLK0sA7Gt8EStv5vB2xKWH8Suo0DOD3Q== X-Received: by 10.194.185.180 with SMTP id fd20mr15723376wjc.98.1457204727972; Sat, 05 Mar 2016 11:05:27 -0800 (PST) Original-Received: from poki-sona-sin.local ([217.155.37.242]) by smtp.gmail.com with ESMTPSA id e19sm5149763wmd.1.2016.03.05.11.05.27 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 05 Mar 2016 11:05:27 -0800 (PST) In-Reply-To: Lars Magne Ingebrigtsen's message of "Sat\, 05 Mar 2016 17\:04\:52 +0100 \(2 hours\, 58 minutes\, 46 seconds ago\)" X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 2a00:1450:400c:c09::230 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:200965 Archived-At: Lars Magne Ingebrigtsen writes: > Magnus Henoch writes: > >> Connecting to xmpp.l.google.com:5222... gnutls.el: >> (err=[gnutls-e-again] Resource temporarily unavailable, try >> again.) boot: (:priority NORMAL :hostname gmail.com :loglevel >> 0 :min-prime-bits nil :trustfiles >> (/opt/local/share/curl/curl-ca-bundle.crt) :crlfiles nil >> :keylist nil :verify-flags nil :verify-error (:hostname . t) >> :callbacks nil) magnus.henoch@gmail.com: connection lost: >> ‘STARTTLS negotiation failed: GnuTLS error: #, >> gnutls-e-again’ >> >> Unfortunately, my attempts at creating a self-contained test >> case have failed so far... What jabber.el does, is that it >> opens an asynchronous network connection (:nowait t), performs >> XMPP feature negotiation in cleartext, and then attempts to do >> STARTTLS using gnutls-negotiate. > > On non-blocking sockets, gnutls-boot no longer waits for the > connection to complete. But if you try to talk to it before > it's completed, it should block the communication until that has > happened, so what function is it that gets that return value? The symbol gnutls-e-again was returned from gnutls-boot, inside gnutls-negotiate. It then called gnutls-errorp on it, which returned t, and thus an error was signalled. > Anyway, there should be a way to specify that you want TLS > negotiation to complete even on non-blocking sockets, so I've > now added this to the trunk. It should probably fix your use > case, too. > > Could you try updating from git and running jabberd again? That fixes the problem. Thanks! Regards, Magnus