From 616c60d93dfab27dde00e1489c6c51340ec93b6c Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 10 Sep 2020 16:41:49 +0200 Subject: 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 --- kbx/backend.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'kbx/backend.h') diff --git a/kbx/backend.h b/kbx/backend.h index 7086ac900..a857fc77c 100644 --- a/kbx/backend.h +++ b/kbx/backend.h @@ -115,7 +115,8 @@ gpg_error_t be_find_request_part (backend_handle_t backend_hd, db_request_part_t *r_part); gpg_error_t be_return_pubkey (ctrl_t ctrl, const void *buffer, size_t buflen, enum pubkey_types pubkey_type, - const unsigned char *ubid); + const unsigned char *ubid, + int is_ephemeral, int is_revoked); int be_is_x509_blob (const unsigned char *blob, size_t bloblen); gpg_error_t be_ubid_from_blob (const void *blob, size_t bloblen, enum pubkey_types *r_pktype, char *r_ubid); -- cgit v1.2.3