Home GnuPG
Diffusion GnuPG 5e5f3ca0c2e0

gpg: Implement searching keys via keygrip.

Description

gpg: Implement searching keys via keygrip.

* kbx/keybox-defs.h (struct _keybox_openpgp_key_info): Add field grip.
* kbx/keybox-openpgp.c (struct keyparm_s): New.
(keygrip_from_keyparm): New.
(parse_key): Compute keygrip.
* kbx/keybox-search.c (blob_openpgp_has_grip): New.
(has_keygrip): Call it.

This has been marked for too long as not yet working. However, it is
a pretty useful feature and will come pretty handy when looking for
all keys matching one keygrip.

Can be optimized a lot by storing the keygrip in the meta data. This
will be done along with the upgrade of KBX for v5 fingerprints.

(cherry picked from commit c128667b3cba749dd14262e032d4c260a2b0acd3)

  • Signed-off-by: Werner Koch <wk@gnupg.org>

Details

Provenance
wernerAuthored on Jan 29 2019, 7:52 PM
Parents
rGb78f293cf06f: common: Provide some convenient OpenPGP related constants.
Branches
Unknown
Tags
Unknown