aboutsummaryrefslogtreecommitdiffstats
path: root/g10/getkey.c
diff options
context:
space:
mode:
authorNeal H. Walfield <[email protected]>2016-11-23 11:29:22 +0000
committerNeal H. Walfield <[email protected]>2016-11-23 11:29:22 +0000
commit03a65a53231cc3132a50a1871e81a512c44da169 (patch)
tree5df81cf4f7fbeaeb24801c5acebd6ce3160e2adf /g10/getkey.c
parentg10: Use es_fopen instead of open. (diff)
downloadgnupg-03a65a53231cc3132a50a1871e81a512c44da169.tar.gz
gnupg-03a65a53231cc3132a50a1871e81a512c44da169.zip
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 <[email protected]> GnuPG-bug-id: 2812
Diffstat (limited to 'g10/getkey.c')
-rw-r--r--g10/getkey.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/g10/getkey.c b/g10/getkey.c
index f0e33c596..68e6a1bf0 100644
--- a/g10/getkey.c
+++ b/g10/getkey.c
@@ -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)