Diffusion GnuPG 0e892bda4e0b

keyboxd: Extend PUBKEY_INFO status line with an uid ordinal.

Authored by werner on Tue, Sep 22, 3:42 PM.

Description

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>

Details

Committed
wernerTue, Sep 22, 3:42 PM
Parents
rGe0a312bfd646: kbx: Add bounds check to detect corrupt keyboxes.
Branches
Unknown
Tags
Unknown