(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 exact &optional operation)
+ "Return URL for QUERY and OPERATION (defaults to \"index\").
If EXACT is non-nil, don't accept approximate matches."
(format "https://%s/pks/lookup?%s"
(cond ((null epa-keyserver)
(url-build-query-string
(append `(("search" ,query)
("options" "mr")
- ("op" "index"))
+ ("op" ,(or operation "index")))
(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)) t "get")
(lambda (status)
(when (plist-get status :error)
(error "Request failed: %s"
(erase-buffer))
(epa-ks-search-mode))
(url-retrieve
- (epa-ks--query-url query exact)
+ (epa-ks--query-url query exact "index")
(lambda (status)
(when (plist-get status :error)
(when buf