From 20b52be9ca29b0bc843fc68a279cb72728ede72f Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Tue, 14 Nov 2017 16:24:12 +0100 Subject: 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 (cherry picked from commit d4e2302d8f4a1ff52d56da4f8e3a5d1c6303822d) --- dirmngr/ks-action.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'dirmngr/ks-action.c') diff --git a/dirmngr/ks-action.c b/dirmngr/ks-action.c index 857aab166..38cd02feb 100644 --- a/dirmngr/ks-action.c +++ b/dirmngr/ks-action.c @@ -296,7 +296,8 @@ ks_action_get (ctrl_t ctrl, uri_item_t keyservers, /* Retrieve keys from URL and write the result to the provided output - stream OUTFP. */ + * stream OUTFP. If OUTFP is NULL the data is written to the bit + * bucket. */ gpg_error_t ks_action_fetch (ctrl_t ctrl, const char *url, estream_t outfp) { -- cgit v1.2.3