aboutsummaryrefslogtreecommitdiffstats
path: root/dirmngr/crlcache.c
diff options
context:
space:
mode:
authorAndre Heinecke <[email protected]>2018-10-24 08:40:42 +0000
committerAndre Heinecke <[email protected]>2018-11-12 12:54:26 +0000
commit678e4706ee614a6b7e543e2a80072d75405dd4db (patch)
tree0f62c1fdae0d90adf4d5d5e00ce0bfcf3caae90b /dirmngr/crlcache.c
parentcommon: Prepare for parsing mail sub-addresses. (diff)
downloadgnupg-678e4706ee614a6b7e543e2a80072d75405dd4db.tar.gz
gnupg-678e4706ee614a6b7e543e2a80072d75405dd4db.zip
dirmngr: Add FLUSHCRLs command
Summary: * dirmngr/crlcache.c (crl_cache_flush): Also deinit the cache. * dirmngr/server.c (hlp_flushcrls, cmd_flushcrls): New. (register_commands): Add FLUSHCRLS. -- This allows it to flush the CRL cache of a running dirmngr server. This can be useful to debug / analyze CRL issues. GnuPG-Bug-Id: T3967 Differential Revision: https://dev.gnupg.org/D469 Signed-off-by: Andre Heinecke <[email protected]> (cherry picked from commit 00321a025f90990a71b60b4689ede1f38fbde347)
Diffstat (limited to 'dirmngr/crlcache.c')
-rw-r--r--dirmngr/crlcache.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index a2867be54..c9e5ca68f 100644
--- a/dirmngr/crlcache.c
+++ b/dirmngr/crlcache.c
@@ -1250,13 +1250,15 @@ crl_cache_deinit (void)
}
-/* Delete the cache from disk. Return 0 on success.*/
+/* Delete the cache from disk and memory. Return 0 on success.*/
int
crl_cache_flush (void)
{
int rc;
+ crl_cache_deinit ();
rc = cleanup_cache_dir (0)? -1 : 0;
+ crl_cache_init ();
return rc;
}