summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2023-09-11 11:24:00 +0200
committerWerner Koch <wk@gnupg.org>2023-09-11 11:24:00 +0200
commit4fc745bc43a74f2aecd654b6b609ba188de76c25 (patch)
tree926fbbab08597b75fd2cc348f541ff86271ce992
parentcommon: Never remove /dev/null. (diff)
downloadgnupg2-4fc745bc43a74f2aecd654b6b609ba188de76c25.tar.xz
gnupg2-4fc745bc43a74f2aecd654b6b609ba188de76c25.zip
dirmngr: Relax the detection of the "none" keyserver.
* dirmngr/server.c (cmd_keyserver): Ignore also hkps://none. (ensure_keyserver): Better ignore also "none" with a hkp or hpks scheme. -- GnuPG-bug-id: 6708
-rw-r--r--dirmngr/server.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/dirmngr/server.c b/dirmngr/server.c
index 827c6207f..1dbc87878 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2215,7 +2215,11 @@ ensure_keyserver (ctrl_t ctrl)
for (sl = opt.keyserver; sl; sl = sl->next)
{
- if (!strcmp (sl->d, "none"))
+ /* Frontends like Kleopatra may prefix option values without a
+ * scheme with "hkps://". Thus we need to check that too.
+ * Nobody will be mad enough to call a machine "none". */
+ if (!strcmp (sl->d, "none") || !strcmp (sl->d, "hkp://none")
+ || !strcmp (sl->d, "hkps://none"))
{
none_seen = 1;
continue;
@@ -2377,7 +2381,8 @@ cmd_keyserver (assuan_context_t ctx, char *line)
if (add_flag)
{
- if (!strcmp (line, "none") || !strcmp (line, "hkp://none"))
+ if (!strcmp (line, "none") || !strcmp (line, "hkp://none")
+ || !strcmp (line, "hkps://none"))
err = 0;
else
err = make_keyserver_item (line, &item);