diff options
author | Werner Koch <[email protected]> | 2020-09-10 14:41:49 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-09-11 10:10:05 +0000 |
commit | 616c60d93dfab27dde00e1489c6c51340ec93b6c (patch) | |
tree | f11192f5947c856acb4256979821d688a918a9c3 /kbx/backend-support.c | |
parent | doc: Update and extend module overview (diff) | |
download | gnupg-616c60d93dfab27dde00e1489c6c51340ec93b6c.tar.gz gnupg-616c60d93dfab27dde00e1489c6c51340ec93b6c.zip |
keyboxd: Add ephemeral and revoked flag to the sqlite backend.
* kbx/backend-support.c (be_return_pubkey): Add args is_ephemeral and
is_revoked. Adjust callers.
* kbx/backend-sqlite.c: Alter table pubkey to add new columns.
(run_select_statement): Add new column to all selects.
(be_sqlite_search): Return the new flags.
--
For existing test databases the new column can be added with:
alter table pubkey add ephemeral integer not null default 0;
alter table pubkey add revoked integer not null default 0;
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/backend-support.c')
-rw-r--r-- | kbx/backend-support.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/kbx/backend-support.c b/kbx/backend-support.c index 7a7d11b90..a35088c74 100644 --- a/kbx/backend-support.c +++ b/kbx/backend-support.c @@ -166,13 +166,17 @@ be_find_request_part (backend_handle_t backend_hd, db_request_t request, * PUBKEY_TYPE to the caller. */ gpg_error_t be_return_pubkey (ctrl_t ctrl, const void *buffer, size_t buflen, - enum pubkey_types pubkey_type, const unsigned char *ubid) + enum pubkey_types pubkey_type, const unsigned char *ubid, + int is_ephemeral, int is_revoked) { gpg_error_t err; char hexubid[2*UBID_LEN+1]; bin2hex (ubid, UBID_LEN, hexubid); - err = status_printf (ctrl, "PUBKEY_INFO", "%d %s", pubkey_type, hexubid); + err = status_printf (ctrl, "PUBKEY_INFO", "%d %s %c%c", + pubkey_type, hexubid, + is_ephemeral? 'e':'-', + is_revoked? 'r':'-' ); if (err) goto leave; |