[git] GnuPG - branch, master, updated. gnupg-2.2.7-268-g678e470
by Andre Heinecke
cvs at cvs.gnupg.org
Mon Nov 12 14:00:45 CET 2018
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GNU Privacy Guard".
The branch, master has been updated
via 678e4706ee614a6b7e543e2a80072d75405dd4db (commit)
from 6b9f772914624cc673ba26d49b6e3adc32dd7e0a (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 678e4706ee614a6b7e543e2a80072d75405dd4db
Author: Andre Heinecke <aheinecke at intevation.de>
Date: Wed Oct 24 10:40:42 2018 +0200
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 <aheinecke at intevation.de>
(cherry picked from commit 00321a025f90990a71b60b4689ede1f38fbde347)
diff --git a/dirmngr/crlcache.c b/dirmngr/crlcache.c
index a2867be..c9e5ca6 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;
}
diff --git a/dirmngr/server.c b/dirmngr/server.c
index a21e1ab..ac25620 100644
--- a/dirmngr/server.c
+++ b/dirmngr/server.c
@@ -2689,6 +2689,20 @@ cmd_reloaddirmngr (assuan_context_t ctx, char *line)
}
+static const char hlp_flushcrls[] =
+ "FLUSHCRLS\n"
+ "\n"
+ "Remove all cached CRLs from memory and\n"
+ "the file system.";
+static gpg_error_t
+cmd_flushcrls (assuan_context_t ctx, char *line)
+{
+ (void)line;
+
+ return leave_cmd (ctx, crl_cache_flush () ? GPG_ERR_GENERAL : 0);
+}
+
+
/* Tell the assuan library about our commands. */
static int
@@ -2719,6 +2733,7 @@ register_commands (assuan_context_t ctx)
{ "LOADSWDB", cmd_loadswdb, hlp_loadswdb },
{ "KILLDIRMNGR",cmd_killdirmngr,hlp_killdirmngr },
{ "RELOADDIRMNGR",cmd_reloaddirmngr,hlp_reloaddirmngr },
+ { "FLUSHCRLS", cmd_flushcrls, hlp_flushcrls },
{ NULL, NULL }
};
int i, j, rc;
-----------------------------------------------------------------------
Summary of changes:
dirmngr/crlcache.c | 4 +++-
dirmngr/server.c | 15 +++++++++++++++
2 files changed, 18 insertions(+), 1 deletion(-)
hooks/post-receive
--
The GNU Privacy Guard
http://git.gnupg.org
More information about the Gnupg-commits
mailing list