1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +02:00

g10: Avoid gratuitously loading a keyblock when it is already available

* g10/trust.c (get_validity): Add new, optional parameter KB.  Only
load the keyblock if KB is NULL.  Update callers.
(get_validity): Likewise.
* g10/trustdb.c (tdb_get_validity_core): Likewise.

--
Signed-off-by: Neal H. Walfield <neal@g10code.com>
GnuPG-bug-id: 2812
This commit is contained in:
Neal H. Walfield 2016-11-23 12:29:22 +01:00
parent bfeafe2d3f
commit 03a65a5323
11 changed files with 108 additions and 50 deletions

View file

@ -1543,7 +1543,7 @@ pubkey_cmp (ctrl_t ctrl, const char *name, struct pubkey_cmp_cookie *old,
new->uid = scopy_user_id (uid);
new->validity =
get_validity (ctrl, &new->key, uid, NULL, 0) & TRUST_MASK;
get_validity (ctrl, new_keyblock, &new->key, uid, NULL, 0) & TRUST_MASK;
new->valid = 1;
if (! old->valid)