From 678e4706ee614a6b7e543e2a80072d75405dd4db Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Wed, 24 Oct 2018 10:40:42 +0200 Subject: 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 (cherry picked from commit 00321a025f90990a71b60b4689ede1f38fbde347) --- dirmngr/crlcache.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'dirmngr/crlcache.c') 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; } -- cgit v1.2.3