summaryrefslogtreecommitdiffstats
path: root/g10/trustdb.h
diff options
context:
space:
mode:
authorNeal H. Walfield <neal@g10code.com>2016-11-23 12:29:22 +0100
committerNeal H. Walfield <neal@g10code.com>2016-11-23 12:29:22 +0100
commit03a65a53231cc3132a50a1871e81a512c44da169 (patch)
tree5df81cf4f7fbeaeb24801c5acebd6ce3160e2adf /g10/trustdb.h
parentg10: Use es_fopen instead of open. (diff)
downloadgnupg2-03a65a53231cc3132a50a1871e81a512c44da169.tar.xz
gnupg2-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 <neal@g10code.com> GnuPG-bug-id: 2812
Diffstat (limited to 'g10/trustdb.h')
-rw-r--r--g10/trustdb.h8
1 files changed, 5 insertions, 3 deletions
diff --git a/g10/trustdb.h b/g10/trustdb.h
index 45ecc56ab..6081d1088 100644
--- a/g10/trustdb.h
+++ b/g10/trustdb.h
@@ -94,9 +94,11 @@ void revalidation_mark (void);
void check_trustdb_stale (ctrl_t ctrl);
void check_or_update_trustdb (ctrl_t ctrl);
-unsigned int get_validity (ctrl_t ctrl, PKT_public_key *pk, PKT_user_id *uid,
+unsigned int get_validity (ctrl_t ctrl, kbnode_t kb, PKT_public_key *pk,
+ PKT_user_id *uid,
PKT_signature *sig, int may_ask);
-int get_validity_info (ctrl_t ctrl, PKT_public_key *pk, PKT_user_id *uid);
+int get_validity_info (ctrl_t ctrl, kbnode_t kb, PKT_public_key *pk,
+ PKT_user_id *uid);
const char *get_validity_string (ctrl_t ctrl,
PKT_public_key *pk, PKT_user_id *uid);
@@ -135,7 +137,7 @@ void tdb_check_or_update (ctrl_t ctrl);
int tdb_cache_disabled_value (PKT_public_key *pk);
-unsigned int tdb_get_validity_core (ctrl_t ctrl,
+unsigned int tdb_get_validity_core (ctrl_t ctrl, kbnode_t kb,
PKT_public_key *pk, PKT_user_id *uid,
PKT_public_key *main_pk,
PKT_signature *sig, int may_ask);