aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/domaininfo.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
* dirmngr: Add command "GETINFO stats".Werner Koch2023-03-101-6/+7
| | | | | | | | | | | * dirmngr/server.c (cmd_getinfo): New sub-command "stats". (dirmngr_status_helpf): Allow for a CTRL of NULL. * dirmngr/certcache.c (cert_cache_print_stats): Add arg ctrl and use dirmngr_status_helpf. Adjust all callers. * dirmngr/domaininfo.c (domaininfo_print_stats): Ditto. * sm/certchain.c (ask_marktrusted): Flush stdout before printing the fingerprint.
* dirmngr: Improve domaininfo cache update algorithm.Werner Koch2019-04-021-19/+106
| | | | | | | | | | | | | | | | | * dirmngr/domaininfo.c (struct domaininfo_s): Add field keepmark. (insert_or_update): Implement new update algorithm. -- The old algorithm limited the length of a bucket chain by purging the last 50% or the entries. Thus the first domains entered into the cache were never purged. The new algorithm is a bit better: It also limits the chain length on overflow to 50% but tries to keep the entries indicating that a WKD is available in the cache. If there is still space to keep more, those which clearly do not support WKD are also kept. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Support the new WKD draft with the openpgpkey subdomain.Werner Koch2018-11-131-1/+1
| | | | | | | * dirmngr/server.c (proc_wkd_get): Implement new openpgpkey subdomain method. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Check for WKD support at session endWerner Koch2017-11-141-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | * 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]>
* dirmngr: Limit the number of cached domains for WKD.Werner Koch2017-11-141-8/+54
| | | | | | | | * dirmngr/domaininfo.c (MAX_DOMAINBUCKET_LEN): New. (insert_or_update): Limit the length of a bucket chain. (domaininfo_print_stats): Print just one summary line. Signed-off-by: Werner Koch <[email protected]>
* dirmngr: Keep track of domains used for WKD queriesWerner Koch2017-11-131-0/+244
* dirmngr/domaininfo.c: New file. * dirmngr/Makefile.am (dirmngr_SOURCES): Add file. * dirmngr/server.c (cmd_wkd_get): Check whether the domain is already known and tell domaininfo about the results. -- This adds a registry for domain information to eventually avoid useless queries for domains which do not support WKD. The missing part is a background task to check whether a queried domain supports WKD at all and to expire old entries. Signed-off-by: Werner Koch <[email protected]>