From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Filipp Gunbin Newsgroups: gmane.emacs.help Subject: Re: problems importing keys via epa-search-keys Date: Sat, 11 Mar 2023 01:58:43 +0300 Message-ID: References: <87zg8mz998.fsf@xelera.eu> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="7908"; mail-complaints-to="usenet@ciao.gmane.io" User-Agent: Gnus/5.13 (Gnus v5.13) Cc: help-gnu-emacs@gnu.org, Philip Kaludercic , Eli Zaretskii To: Giovanni Biscuolo Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 10 23:59:27 2023 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1palht-0001mS-Gg for geh-help-gnu-emacs@m.gmane-mx.org; Fri, 10 Mar 2023 23:59:27 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1palhR-0005ve-9l; Fri, 10 Mar 2023 17:58:57 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1palhP-0005vH-Mr for help-gnu-emacs@gnu.org; Fri, 10 Mar 2023 17:58:55 -0500 Original-Received: from wout2-smtp.messagingengine.com ([64.147.123.25]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1palhN-00064l-Ot; Fri, 10 Mar 2023 17:58:55 -0500 Original-Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.west.internal (Postfix) with ESMTP id 29CCA3200986; Fri, 10 Mar 2023 17:58:49 -0500 (EST) Original-Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Fri, 10 Mar 2023 17:58:49 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.fm; h= cc:cc:content-transfer-encoding:content-type:content-type:date :date:from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to; s=fm2; t= 1678489128; x=1678575528; bh=luPQsPxdWyB0XRi54vSViH+XVPGy24L+657 SxzEelHE=; b=sJEiEWngE4wo2enhDqm5Y2m0eOaRKxwGngRfRFL9gMupigWCB4D eYSWUWjKz74oiTF3r7dydA/vEN6AeckO/pfDyv+X++f9lvvKElGPueFEMjXXQa9g SJWAn1xwjtL9Wl6qB5A9cgmCEqM2mwem3T1rzwfC5Ev40YEp8XlwnQg7Pg4eoYsI fFt1qpHrTuYJM0kkYwG9UntwrmLEBvZWUy4HLtChs2w0hlLPVOsucd/0VXCbeXOQ T7bAgs1IG4lcfRHoiN2DlzPhEPEXtoOU7JS7XvWdpQtLfKpQaEqE1XNNsNH02saU iX6U3Z47gPAdqqUGt1wKUsPr3dQSDVAajJQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding :content-type:content-type:date:date:feedback-id:feedback-id :from:from:in-reply-to:in-reply-to:message-id:mime-version :references:reply-to:sender:subject:subject:to:to:x-me-proxy :x-me-proxy:x-me-sender:x-me-sender:x-sasl-enc; s=fm1; t= 1678489128; x=1678575528; bh=luPQsPxdWyB0XRi54vSViH+XVPGy24L+657 SxzEelHE=; b=HdjPSc6b7MhwQuYP5jFLLMo6f+fuhoXYDHHSVbtcXo2yZLkJvb4 To2/LELqSo5Kk6eKTDxn0564TTcXC6LuvgbFOnlnZ5tdQei2vfFOgdnqGekWyCrQ HGKfMHUvWX9wHmQ3HyerFnDoIyyCVQpx1aybgKjIzWU7r94w7wuRG5jnsHUXNchy vch4nBNbE/TTACrgW5zdONuTrsaAi1KkxXW9hnrfANLyWFVRbMC20DlOpQdGHAK0 fu4adeecn9ZrYa+5YjjJjGynKv3Xj9l+s2kPhVpph4eww8sK0PKyY28bgzEVryXV zGY7HUZeZPv5hqdUH2kZq7JYIy5fqoQAJIA== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvhedrvdduledgtdegucetufdoteggodetrfdotf fvucfrrhhofhhilhgvmecuhfgrshhtofgrihhlpdfqfgfvpdfurfetoffkrfgpnffqhgen uceurghilhhouhhtmecufedttdenucesvcftvggtihhpihgvnhhtshculddquddttddmne cujfgurhephffvvefujghffgffkfggtgfgsehtqhertddtreejnecuhfhrohhmpefhihhl ihhpphcuifhunhgsihhnuceofhhguhhnsghinhesfhgrshhtmhgrihhlrdhfmheqnecugg ftrfgrthhtvghrnhepleejuddtudekteevudelteduffehleekhfeuieekieegfeehheet hedvvdegleelnecuffhomhgrihhnpehophgvnhhpghhprdhorhhgnecuvehluhhsthgvrh fuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepfhhguhhnsghinhesfhgrshht mhgrihhlrdhfmh X-ME-Proxy: Feedback-ID: id48c41f1:Fastmail Original-Received: by mail.messagingengine.com (Postfix) with ESMTPA; Fri, 10 Mar 2023 17:58:47 -0500 (EST) In-Reply-To: <87zg8mz998.fsf@xelera.eu> (Giovanni Biscuolo's message of "Thu, 09 Mar 2023 08:14:43 +0100") Mail-Followup-To: Giovanni Biscuolo , help-gnu-emacs@gnu.org, Philip Kaludercic , Eli Zaretskii Received-SPF: pass client-ip=64.147.123.25; envelope-from=fgunbin@fastmail.fm; helo=wout2-smtp.messagingengine.com X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.help:142972 Archived-At: On 09/03/2023 08:14 +0100, Giovanni Biscuolo wrote: > Hello, > > (please if you reply include me in Cc: since I'm not subscribed) > > if I "M-x epa-search-keys" and try to fetch a key with =3Df=3D and then = =3Dx=3D > in =3DKey search=3D buffer, I get this in *Messages*: > > > Searching keys... > Press =E2=80=98f=E2=80=99 to mark a key, =E2=80=98x=E2=80=99 to fetch all= marked keys. > Contacting host: keys.openpgp.org:443 > > > but the key is never imported in my gnupg keyring. > [...] Hi, Yes, broken since 23b6cd41f55b833e8a562c51642d36b5211a510b, the patch is below. Eli, would this be OK for emacs-29? This is clearly a regression. Thanks. diff --git a/lisp/epa-ks.el b/lisp/epa-ks.el index 77d896fa438..2ab550cb9b1 100644 --- a/lisp/epa-ks.el +++ b/lisp/epa-ks.el @@ -140,8 +140,8 @@ epa-ks-do-key-to-fetch (epa-ks--fetch-key id))))) (tabulated-list-clear-all-tags)) =20 -(defun epa-ks--query-url (query exact) - "Return URL for QUERY. +(defun epa-ks--query-url (query operation exact) + "Return URL for QUERY and OPERATION. If EXACT is non-nil, don't accept approximate matches." (format "https://%s/pks/lookup?%s" (cond ((null epa-keyserver) @@ -154,13 +154,13 @@ epa-ks--query-url (url-build-query-string (append `(("search" ,query) ("options" "mr") - ("op" "index")) + ("op" ,operation)) (and exact '(("exact" "on"))))))) =20 (defun epa-ks--fetch-key (id) "Send request to import key with specified ID." (url-retrieve - (epa-ks--query-url (concat "0x" (url-hexify-string id)) t) + (epa-ks--query-url (concat "0x" (url-hexify-string id)) "get" t) (lambda (status) (when (plist-get status :error) (error "Request failed: %s" @@ -236,7 +236,7 @@ epa-search-keys (erase-buffer)) (epa-ks-search-mode)) (url-retrieve - (epa-ks--query-url query exact) + (epa-ks--query-url query "index" exact) (lambda (status) (when (plist-get status :error) (when buf