aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keyboxd.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2019-08-06 14:07:33 +0000
committerWerner Koch <[email protected]>2019-08-06 14:07:33 +0000
commit5ea6250cc5761612d17ca4fb34eed096f26e2826 (patch)
tree062877d21a2f53ff01918a2a73ed02fcf80fded1 /kbx/keyboxd.h
parentkbx: Allow writing using a estream. (diff)
downloadgnupg-5ea6250cc5761612d17ca4fb34eed096f26e2826.tar.gz
gnupg-5ea6250cc5761612d17ca4fb34eed096f26e2826.zip
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 <[email protected]>
Diffstat (limited to 'kbx/keyboxd.h')
-rw-r--r--kbx/keyboxd.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/kbx/keyboxd.h b/kbx/keyboxd.h
index 7719061f4..edef8975c 100644
--- a/kbx/keyboxd.h
+++ b/kbx/keyboxd.h
@@ -55,6 +55,8 @@ struct
#define DBG_MEMSTAT_VALUE 128 /* show memory statistics */
#define DBG_HASHING_VALUE 512 /* debug hashing operations */
#define DBG_IPC_VALUE 1024 /* Enable Assuan debugging. */
+#define DBG_CLOCK_VALUE 4096 /* debug timings (required build option). */
+#define DBG_LOOKUP_VALUE 8192 /* debug the key lookup */
/* Test macros for the debug option. */
#define DBG_CRYPTO (opt.debug & DBG_CRYPTO_VALUE)
@@ -62,6 +64,14 @@ struct
#define DBG_CACHE (opt.debug & DBG_CACHE_VALUE)
#define DBG_HASHING (opt.debug & DBG_HASHING_VALUE)
#define DBG_IPC (opt.debug & DBG_IPC_VALUE)
+#define DBG_CLOCK (opt.debug & DBG_CLOCK_VALUE)
+#define DBG_LOOKUP (opt.debug & DBG_LOOKUP_VALUE)
+
+
+/* Declaration of a database request object. This is used for all
+ * database operation (search, insert, update, delete). */
+struct db_request_s;
+typedef struct db_request_s *db_request_t;
/* Forward reference for local definitions in command.c. */
struct server_local_s;
@@ -95,6 +105,13 @@ struct server_control_s
unsigned long client_pid;
int client_uid;
+ /* Two database request objects used with a connection. They are
+ * auto-created as needed. */
+ db_request_t opgp_req;
+ db_request_t x509_req;
+
+ /* Flags for the current request. */
+ unsigned int no_data_return : 1; /* Used by SEARCH and NEXT. */
};
@@ -132,6 +149,8 @@ void kbxd_sighup_action (void);
/*-- kbxserver.c --*/
+gpg_error_t kbxd_write_data_line (ctrl_t ctrl,
+ const void *buffer_arg, size_t size);
void kbxd_start_command_handler (ctrl_t, gnupg_fd_t, unsigned int);
#endif /*KEYBOXD_H*/