diff options
| author | Werner Koch <[email protected]> | 2020-09-22 13:42:12 +0000 |
|---|---|---|
| committer | Werner Koch <[email protected]> | 2020-09-22 13:42:40 +0000 |
| commit | 0e892bda4e0bf9db9116d7d5585d4e7b0d2eae57 (patch) | |
| tree | d696b53bb2ecc8ee4e2a3f4b7a9c8e358df9f029 /kbx/backend.h | |
| parent | kbx: Add bounds check to detect corrupt keyboxes. (diff) | |
| download | gnupg-0e892bda4e0bf9db9116d7d5585d4e7b0d2eae57.tar.gz gnupg-0e892bda4e0bf9db9116d7d5585d4e7b0d2eae57.zip | |
keyboxd: Extend PUBKEY_INFO status line with an uid ordinal.
* kbx/backend-sqlite.c (table_definitions): Add column UINO to
userids.
(be_sqlite_local_s): Add fields select_col_uidno and
select_col_subkey.
(run_select_statement): Also select subkey or uidno column.
(be_sqlite_search): Return their values.
(store_into_userid): Store the UIDNO.
* kbx/backend-support.c (be_return_pubkey): Extend PUBKEY_INFO.
--
For an existing database adding the new column to the table userid is
straightforward. However if the original version of the schema used an
integer for the keyid column, that column has likely be renamed. Make
sure that the NOT NULL constraint has also be removed; check the
SQLite documentation on how this can be done.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'kbx/backend.h')
| -rw-r--r-- | kbx/backend.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/kbx/backend.h b/kbx/backend.h index a857fc77c..a241490a7 100644 --- a/kbx/backend.h +++ b/kbx/backend.h @@ -116,7 +116,8 @@ gpg_error_t be_find_request_part (backend_handle_t backend_hd, gpg_error_t be_return_pubkey (ctrl_t ctrl, const void *buffer, size_t buflen, enum pubkey_types pubkey_type, const unsigned char *ubid, - int is_ephemeral, int is_revoked); + int is_ephemeral, int is_revoked, + int uidno, int pkno); 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); |
