diff options
author | Werner Koch <[email protected]> | 2020-09-11 10:00:53 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2020-09-11 10:10:05 +0000 |
commit | 9a94db1f662a1c5973b57b25e25aeab1bc33250e (patch) | |
tree | cc0a9abdcaa29bcf7a23914e6cd426c4242591c8 /common/stringhelp.c | |
parent | keyboxd: Add ephemeral and revoked flag to the sqlite backend. (diff) | |
download | gnupg-9a94db1f662a1c5973b57b25e25aeab1bc33250e.tar.gz gnupg-9a94db1f662a1c5973b57b25e25aeab1bc33250e.zip |
keyboxd: Implement lookup by short and long keyid.
* kbx/backend-sqlite.c: Change definition of column KID.
(kid_from_mem): Remove.
(kid_from_u32): Rewrite.
(run_sql_bind_int64): Remove.
(run_select_statement): Implement lookup by short keyid. Fix lookup
by long keyid.
(store_into_fingerprint): Adjust kid arg.
--
The original idea of using an INTEGER, which has the required 64 bits,
didn't worked out due to problems with signed/unsigned mismatch and
the required truncation in a short keyid lookup. Thus we change the
definition to a blob.
For a database currently in use the change can be done by hand:
alter table fingerprint rename column kid to deletedkid;
alter table fingerprint add column kid not null
default X'0000000000000000';
update fingerprint set kid = substr (fpr, 13);
The update does only work with 20 octet fingerprints; that is not with
the new v5 OpenPGP keys. Note that sqlite does not allow to drip a
column, thus we rename it.
Signed-off-by: Werner Koch <[email protected]>
Diffstat (limited to 'common/stringhelp.c')
0 files changed, 0 insertions, 0 deletions