g10: Avoid gratuitously loading a keyblock when it is already available
authorNeal H. Walfield <neal@g10code.com>
Wed, 23 Nov 2016 11:29:22 +0000 (12:29 +0100)
committerNeal H. Walfield <neal@g10code.com>
Wed, 23 Nov 2016 11:29:22 +0000 (12:29 +0100)
commit03a65a53231cc3132a50a1871e81a512c44da169
tree5df81cf4f7fbeaeb24801c5acebd6ce3160e2adf
parentbfeafe2d3f9bbaa7f11f3ad870a446141c038b0d
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
g10/getkey.c
g10/gpgv.c
g10/keyedit.c
g10/keylist.c
g10/mainproc.c
g10/photoid.c
g10/pkclist.c
g10/test-stubs.c
g10/trust.c
g10/trustdb.c
g10/trustdb.h