mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-02 22:46:30 +02:00
kbx: Add framework for the SEARCH command
* kbx/backend-kbx.c: New. * kbx/backend-support.c: New. * kbx/backend.h: New. * kbx/frontend.c: New. * kbx/frontend.h: New. * kbx/kbxserver.c: Implement SEARCH and NEXT command. * kbx/keybox-search-desc.h (enum pubkey_types): New. * kbx/keybox-search.c (keybox_get_data): New. * kbx/keyboxd.c (main): Add a standard resource. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
1f980d23af
commit
5ea6250cc5
13 changed files with 1237 additions and 34 deletions
|
@ -56,7 +56,7 @@
|
|||
#include "../common/init.h"
|
||||
#include "../common/gc-opt-flags.h"
|
||||
#include "../common/exechelp.h"
|
||||
|
||||
#include "frontend.h"
|
||||
|
||||
enum cmd_and_opt_values
|
||||
{
|
||||
|
@ -127,6 +127,8 @@ static struct debug_flags_s debug_flags [] =
|
|||
{ DBG_MEMSTAT_VALUE, "memstat" },
|
||||
{ DBG_HASHING_VALUE, "hashing" },
|
||||
{ DBG_IPC_VALUE , "ipc" },
|
||||
{ DBG_CLOCK_VALUE , "clock" },
|
||||
{ DBG_LOOKUP_VALUE , "lookup" },
|
||||
{ 77, NULL } /* 77 := Do not exit on "help" or "?". */
|
||||
};
|
||||
|
||||
|
@ -727,6 +729,9 @@ main (int argc, char **argv )
|
|||
kbxd_exit (1);
|
||||
}
|
||||
kbxd_init_default_ctrl (ctrl);
|
||||
|
||||
kbxd_add_resource (ctrl, "pubring.kbx", 0);
|
||||
|
||||
kbxd_start_command_handler (ctrl, GNUPG_INVALID_FD, 0);
|
||||
kbxd_deinit_default_ctrl (ctrl);
|
||||
xfree (ctrl);
|
||||
|
@ -848,6 +853,22 @@ main (int argc, char **argv )
|
|||
exit (1);
|
||||
}
|
||||
|
||||
{
|
||||
ctrl_t ctrl;
|
||||
|
||||
ctrl = xtrycalloc (1, sizeof *ctrl);
|
||||
if (!ctrl)
|
||||
{
|
||||
log_error ("error allocating connection control data: %s\n",
|
||||
strerror (errno) );
|
||||
kbxd_exit (1);
|
||||
}
|
||||
kbxd_init_default_ctrl (ctrl);
|
||||
kbxd_add_resource (ctrl, "pubring.kbx", 0);
|
||||
kbxd_deinit_default_ctrl (ctrl);
|
||||
xfree (ctrl);
|
||||
}
|
||||
|
||||
log_info ("%s %s started\n", strusage(11), strusage(13) );
|
||||
handle_connections (fd);
|
||||
assuan_sock_close (fd);
|
||||
|
@ -974,6 +995,7 @@ kbxd_deinit_default_ctrl (ctrl_t ctrl)
|
|||
{
|
||||
if (!ctrl)
|
||||
return;
|
||||
kbxd_release_session_info (ctrl);
|
||||
ctrl->magic = 0xdeadbeef;
|
||||
unregister_progress_cb ();
|
||||
xfree (ctrl->lc_messages);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue