From aba82684fe14289cf62b4694bc398f3a274b4762 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Mon, 9 Sep 2019 14:34:09 +0200 Subject: gpg: New option --use-keyboxd. * g10/gpg.c (oUseKeyboxd,oKeyboxdProgram): New consts. (opts): New options --use-keyboxd and --keyboxd-program. (main): Implement them. * g10/keydb.c: Move some defs out to ... * g10/keydb-private.h: new file. * g10/keydb.c: prefix function names with "internal" and move original functions to ... * g10/call-keyboxd.c: new file. Divert to the internal fucntion if --use-keyboxd is used. Add a CTRL arg to most fucntions and change all callers. * g10/Makefile.am (common_source): Add new files. (noinst_PROGRAMS): Do bot build gpgcompose. -- Note that this is just the framework with only a basic implementation of searching via keyboxd. Signed-off-by: Werner Koch --- g10/t-keydb-get-keyblock.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'g10/t-keydb-get-keyblock.c') diff --git a/g10/t-keydb-get-keyblock.c b/g10/t-keydb-get-keyblock.c index 167a9bbee..90ce6e9a6 100644 --- a/g10/t-keydb-get-keyblock.c +++ b/g10/t-keydb-get-keyblock.c @@ -21,9 +21,11 @@ #include "keydb.h" + static void do_test (int argc, char *argv[]) { + ctrl_t ctrl; char *fname; int rc; KEYDB_HANDLE hd1; @@ -33,6 +35,7 @@ do_test (int argc, char *argv[]) (void) argc; (void) argv; + ctrl = xcalloc (1, sizeof *ctrl); /* t-keydb-get-keyblock.gpg contains two keys: a modern key followed by a legacy key. If we get the keyblock for the modern key, we shouldn't get @@ -44,7 +47,7 @@ do_test (int argc, char *argv[]) if (rc) ABORT ("Failed to open keyring."); - hd1 = keydb_new (); + hd1 = keydb_new (ctrl); if (!hd1) ABORT (""); @@ -62,4 +65,5 @@ do_test (int argc, char *argv[]) keydb_release (hd1); release_kbnode (kb1); + xfree (ctrl); } -- cgit v1.2.3