From: Filipp Gunbin <fgunbin@fastmail.fm>
To: Giovanni Biscuolo <g@xelera.eu>
Cc: help-gnu-emacs@gnu.org, Philip Kaludercic <philipk@posteo.net>,
Eli Zaretskii <eliz@gnu.org>
Subject: Re: problems importing keys via epa-search-keys
Date: Sat, 11 Mar 2023 01:58:43 +0300 [thread overview]
Message-ID: <m2edpwrz6k.fsf@fastmail.fm> (raw)
In-Reply-To: <87zg8mz998.fsf@xelera.eu> (Giovanni Biscuolo's message of "Thu, 09 Mar 2023 08:14:43 +0100")
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 =f= and then =x=
> in =Key search= buffer, I get this in *Messages*:
>
>
> Searching keys...
> Press ‘f’ to mark a key, ‘x’ 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))
-(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")))))))
(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
next prev parent reply other threads:[~2023-03-10 22:58 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-09 7:14 problems importing keys via epa-search-keys Giovanni Biscuolo
2023-03-10 22:58 ` Filipp Gunbin [this message]
2023-03-11 7:05 ` Giovanni Biscuolo
2023-03-11 22:10 ` Filipp Gunbin
2023-03-12 9:32 ` Giovanni Biscuolo
2023-03-11 7:17 ` Eli Zaretskii
2023-03-11 23:04 ` Filipp Gunbin
2023-03-12 6:33 ` Eli Zaretskii
2023-03-13 12:37 ` Filipp Gunbin
2023-03-13 14:43 ` Eli Zaretskii
2023-03-13 17:40 ` Filipp Gunbin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=m2edpwrz6k.fsf@fastmail.fm \
--to=fgunbin@fastmail.fm \
--cc=eliz@gnu.org \
--cc=g@xelera.eu \
--cc=help-gnu-emacs@gnu.org \
--cc=philipk@posteo.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).