aboutsummaryrefslogtreecommitdiffstats
path: root/kbx/keyboxd.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2020-09-10 10:05:21 +0000
committerWerner Koch <[email protected]>2020-09-10 10:08:48 +0000
commit29977e21d18188e16e50fee95a95e05fdbd97caf (patch)
tree153025c422ab7eec318ff4c8ecfeee4914388087 /kbx/keyboxd.h
parentgpg-connect-agent: Catch signals so that SIGPIPE is ignored. (diff)
downloadgnupg-29977e21d18188e16e50fee95a95e05fdbd97caf.tar.gz
gnupg-29977e21d18188e16e50fee95a95e05fdbd97caf.zip
keyboxd: Add options --openpgp and --x509 to SEARCH.
* kbx/keyboxd.h (struct server_control_s): Replace the two request objects by just one. Add filter flags. * kbx/kbxserver.c (cmd_search): Add options --openpgp and --x509. (cmd_killkeyboxd): Do not return GPG_ERR_EOF. * kbx/frontend.c (kbxd_release_session_info): Adjust for the new request object. (kbxd_search, kbxd_store, kbxd_delete): Ditto. * kbx/backend-sqlite.c (struct be_sqlite_local_s): Add filter flags. (run_sql_prepare): Add optional arg 'extra'. Change callers. (run_sql_bind_ntext): New. (run_sql_bind_text): Just call run_sql_bind_ntext. (run_select_statement): Add ctrl arg. Implement the filter flags. * g10/call-keyboxd.c (keydb_search): Use the --openpgp option. -- As soon as we implement X.509 we need to have a way to return only openpgp or x.509 certificates. Gpg/gpgsm will then use the respective flag. Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/keyboxd.h')
-rw-r--r--kbx/keyboxd.h13
1 files changed, 9 insertions, 4 deletions
diff --git a/kbx/keyboxd.h b/kbx/keyboxd.h
index f0b705aad..22988bf1b 100644
--- a/kbx/keyboxd.h
+++ b/kbx/keyboxd.h
@@ -106,13 +106,18 @@ struct server_control_s
unsigned long client_pid;
int client_uid;
- /* Two database request objects used with a connection. They are
+ /* The database request object used with a connection. It is
* auto-created as needed. */
- db_request_t opgp_req;
- db_request_t x509_req;
+ db_request_t db_req;
/* Flags for the current request. */
- unsigned int no_data_return : 1; /* Used by SEARCH and NEXT. */
+
+ /* If the any of the filter flags are set a search returns only
+ * results with a blob type matching one of these filter flags. */
+ unsigned int filter_opgp : 1;
+ unsigned int filter_x509 : 1;
+ /* Used by SEARCH and NEXT. */
+ unsigned int no_data_return : 1;
};