From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED.blaine.gmane.org!not-for-mail From: Robert Pluim Newsgroups: gmane.emacs.bugs Subject: bug#38602: 26.3; gnutls-negotiate fails to handle :verify-error being set to t Date: Sat, 14 Dec 2019 13:59:19 +0100 Message-ID: References: <875zijbq2z.fsf@ada> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: blaine.gmane.org; posting-host="blaine.gmane.org:195.159.176.226"; logging-data="243100"; mail-complaints-to="usenet@blaine.gmane.org" Cc: 38602@debbugs.gnu.org To: Alexis Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Sun Dec 15 00:26:10 2019 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([209.51.188.17]) by blaine.gmane.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.89) (envelope-from ) id 1igGnY-001126-Tg for geb-bug-gnu-emacs@m.gmane.org; Sun, 15 Dec 2019 00:26:09 +0100 Original-Received: from localhost ([::1]:34560 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igGnX-0003Tf-QT for geb-bug-gnu-emacs@m.gmane.org; Sat, 14 Dec 2019 18:26:07 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:42807) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1igGkk-0000ca-JV for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 18:23:15 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1igGkj-0002ql-2g for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 18:23:14 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:58119) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1igGki-0002PA-PZ for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 18:23:12 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1ig71e-0002ZA-AK for bug-gnu-emacs@gnu.org; Sat, 14 Dec 2019 08:00:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Robert Pluim Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 14 Dec 2019 13:00:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38602 X-GNU-PR-Package: emacs Original-Received: via spool by 38602-submit@debbugs.gnu.org id=B38602.15763283709784 (code B ref 38602); Sat, 14 Dec 2019 13:00:02 +0000 Original-Received: (at 38602) by debbugs.gnu.org; 14 Dec 2019 12:59:30 +0000 Original-Received: from localhost ([127.0.0.1]:35031 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ig718-0002Xk-GP for submit@debbugs.gnu.org; Sat, 14 Dec 2019 07:59:30 -0500 Original-Received: from mail-wm1-f45.google.com ([209.85.128.45]:33480) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1ig715-0002XT-AS for 38602@debbugs.gnu.org; Sat, 14 Dec 2019 07:59:28 -0500 Original-Received: by mail-wm1-f45.google.com with SMTP id d139so1390735wmd.0 for <38602@debbugs.gnu.org>; Sat, 14 Dec 2019 04:59:27 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:references:gmane-reply-to-list:date:in-reply-to :message-id:mime-version:content-transfer-encoding; bh=djJc7fJI+WmtGgHVK5acOyV7xTTvS4iR1SGcHieLS5Y=; b=elxYP4SKzcI4OU6z0Y+pSnNHL3Ps7iVPTwKVr1OffnDO7LHf9sAQvbvPdReNPabJa7 qMIRWUuZ5xd8Puz5hn64J6JRBOO6Co64hFz+8OQFu6j7bE+aQezOnaQRPQ30t9u6V/LO /gOM2rVRaP+YIF6Mfwz3FbI4YMvCby98esyWsvScNhgDlmbYOm4QvzPQCVrj7d1Vk3iK vqt2NtsEi2+S/LutAAp6kj4NxdRyRtW8LVnFbswjj/spuIxo7yzprAhfdyicN83Ucx2q gDCsYo6QiydkWyu181SG6wxlXbP+MIoB4lD1RaBVtlsY/d3Zk1UjX9PIgTbYnavnzpYj DAVA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:references :gmane-reply-to-list:date:in-reply-to:message-id:mime-version :content-transfer-encoding; bh=djJc7fJI+WmtGgHVK5acOyV7xTTvS4iR1SGcHieLS5Y=; b=sm6doz1EpBS8ySVRSojQ63Yr0BOwlKa8G2mqhiOc4HJiUfZRzh447yzkVmBO0oqo4v Q0K/BpAJgpudF+pL1XS7phOWuprLreiX2oPLNnAdR1YAgLltVS0evCuhIUJAa1l6LQ8/ Hzwa/SVS8CLxJCVKODrb3nHKrf3dfvX/BY4Bd+l0kFZlu8TBHWjo153DPiK2IEuYVpG0 4TBvqzf3yX/0GDOLG3uezIjqTldAd01SiUtAmiaaSbJkEDW+5RvPw8fvByhwRAzJcaXo ISv2bIY0lNTDezuZSaEIhjMA3XCubjVZfyTw4zFMHLU39mzLJoy+y5vEhxMoJZp5itoT DUvA== X-Gm-Message-State: APjAAAXuOeFqBPJO3KGTyw/cNA7W9agBk+vTpORIZ/I+2gM3bldnvUCm FLbks17thltN+088IQ7itXmcKEHYHr4= X-Google-Smtp-Source: APXvYqzojWifrf3mdSHTxv6Bcre0hw1CUMzcYwZGs8+ARNeEncTjY6DrjCea61BDHKfm+T6RY+yzPw== X-Received: by 2002:a7b:cc13:: with SMTP id f19mr19910146wmh.81.1576328360995; Sat, 14 Dec 2019 04:59:20 -0800 (PST) Original-Received: from rpluim-mac ([2a01:e34:ecfc:a860:9963:4834:5476:cc84]) by smtp.gmail.com with ESMTPSA id x17sm12712289wrt.74.2019.12.14.04.59.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Dec 2019 04:59:20 -0800 (PST) Gmane-Reply-To-List: yes In-Reply-To: <875zijbq2z.fsf@ada> (Alexis's message of "Sat, 14 Dec 2019 13:25:56 +1100") X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:173360 Archived-At: >>>>> On Sat, 14 Dec 2019 13:25:56 +1100, Alexis sai= d: Alexis> When establishing a connection to an XMPP server, jabber.el end= s up Alexis> calling `gnutls-negotiate' with :verify-error set to `t'. When Alexis> `gnutls-negotiate' calls `gnutls-boot-parameters', the lines: Alexis> (when verify-hostname-error Alexis> (push :hostname verify-error)) Alexis> in the latter create a dotted list rather than a proper list, Alexis> resulting in jabber.el returning the error message: Alexis> connection lost: 'STARTTLS negotiation failed: Wrong type Alexis> argument: listp, (:hostname . t)' That=CA=BCs a misleading error message. It=CA=BCs not a proper list, as you= say, but it *is* a list. How about this? Producing a list (:hostname t) is not what you want, since that removes the 'check everything' feature of specifying just 't'. diff --git a/lisp/net/gnutls.el b/lisp/net/gnutls.el index 9b13adaefe..14368bc298 100644 --- a/lisp/net/gnutls.el +++ b/lisp/net/gnutls.el @@ -345,8 +345,11 @@ gnutls-boot-parameters (t nil)))) (min-prime-bits (or min-prime-bits gnutls-min-prime-bits))) =20 - (when verify-hostname-error - (push :hostname verify-error)) + ;; Only add :hostname if `verify-error' is not t, since t + ;; means "include :hostname" Bug#38602. + (and verify-hostname-error + (not (eq verify-error t)) + (push :hostname verify-error)) =20 `(:priority ,priority-string :hostname ,hostname