mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
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.
Signed-off-by: Werner Koch <wk@gnupg.org>
(cherry picked from commit c128667b3c
)
This commit is contained in:
parent
b78f293cf0
commit
5e5f3ca0c2
5 changed files with 204 additions and 24 deletions
|
@ -94,11 +94,12 @@ struct keybox_handle {
|
|||
};
|
||||
|
||||
|
||||
/* Openpgp helper structures. */
|
||||
/* OpenPGP helper structures. */
|
||||
struct _keybox_openpgp_key_info
|
||||
{
|
||||
struct _keybox_openpgp_key_info *next;
|
||||
int algo;
|
||||
unsigned char grip[20];
|
||||
unsigned char keyid[8];
|
||||
int fprlen; /* Either 16 or 20 */
|
||||
unsigned char fpr[20];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue