aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/domaininfo.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2017-11-14 15:24:12 +0000
committerWerner Koch <[email protected]>2017-11-14 15:24:12 +0000
commitd4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d (patch)
tree5b4411772c0b11d7f079aad9407d5504f8f4938c /dirmngr/domaininfo.c
parentdirmngr: Add a background task framework. (diff)
downloadgnupg-d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d.tar.gz
gnupg-d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d.zip
dirmngr: Check for WKD support at session end
* dirmngr/domaininfo.c (insert_or_update): Copy the name. * dirmngr/misc.c (copy_stream): Allow arg OUT to be NULL. * dirmngr/server.c (set_error): Protect CTX. (dirmngr_status): Protect against missing ASSUAN_CTX. (dirmngr_status_help): Ditto. (dirmngr_status_printf): Ditto. (cmd_wkd_get): Factor code out to ... (proc_wkd_get): new func. Support silent operation with no CTX. (task_check_wkd_support): New. -- This finalizes the feature to efficiently cache WKD checks. If a standard WKD query returns no data, we queue a test to be run after the end of the session (so that we do not delay the calling client). This check tests whether the server responsible for the queried address has WKD at all enabled. The test is done by checking whether the "policy" file exists. We do not check the "submission-address" file because that is not necessary for the web key operation. The policy file is now required. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'dirmngr/domaininfo.c')
-rw-r--r--dirmngr/domaininfo.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/dirmngr/domaininfo.c b/dirmngr/domaininfo.c
index 90cdb856c..a2effffef 100644
--- a/dirmngr/domaininfo.c
+++ b/dirmngr/domaininfo.c
@@ -158,6 +158,7 @@ insert_or_update (const char *domain,
di_new = xtrycalloc (1, sizeof *di + strlen (domain));
if (!di_new)
return; /* Out of core - we ignore this. */
+ strcpy (di_new->name, domain);
/* Need to do another lookup because the malloc is a system call and
* thus the hash array may have been changed by another thread. */