mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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 <wk@gnupg.org>
This commit is contained in:
parent
e0a312bfd6
commit
0e892bda4e
6 changed files with 104 additions and 30 deletions
|
@ -1016,7 +1016,8 @@ be_cache_search (ctrl_t ctrl, backend_handle_t backend_hd, db_request_t request,
|
|||
if (b)
|
||||
{
|
||||
err = be_return_pubkey (ctrl, b->data, b->datalen,
|
||||
b->pktype, desc[n].u.ubid, 0, 0);
|
||||
b->pktype, desc[n].u.ubid,
|
||||
0, 0, 0, 0);
|
||||
blob_unref (b);
|
||||
reqpart->cache_seqno.ubid++;
|
||||
}
|
||||
|
@ -1058,7 +1059,7 @@ be_cache_search (ctrl_t ctrl, backend_handle_t backend_hd, db_request_t request,
|
|||
if (b)
|
||||
{
|
||||
err = be_return_pubkey (ctrl, b->data, b->datalen,
|
||||
PUBKEY_TYPE_OPGP, bl->ubid, 0, 0);
|
||||
PUBKEY_TYPE_OPGP, bl->ubid, 0, 0, 0, 0);
|
||||
blob_unref (b);
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue