mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Prepare for signatures with ISSUER_FPR but without ISSUER.
* g10/getkey.c (get_pubkey_for_sig): New. (get_pubkeyblock_for_sig): New. * g10/mainproc.c (issuer_fpr_raw): Give global scope. (check_sig_and_print): Use get_pubkeyblock_for_sig. * g10/pkclist.c (check_signatures_trust): Use get_pubkey_for_sig. * g10/sig-check.c (check_signature2): Ditto. (check_signature_over_key_or_uid): Ditto. -- GnuPG-bug-id: 4046 The whole getkey stuff is still a mess with way to much duplication and missing caching of already fetched data. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
9ea9b9db7e
commit
f7526c7bc7
6 changed files with 60 additions and 8 deletions
|
@ -283,6 +283,10 @@ void cache_public_key( PKT_public_key *pk );
|
|||
/* Disable and drop the public key cache. */
|
||||
void getkey_disable_caches(void);
|
||||
|
||||
/* Return the public key used for signature SIG and store it at PK. */
|
||||
gpg_error_t get_pubkey_for_sig (ctrl_t ctrl,
|
||||
PKT_public_key *pk, PKT_signature *sig);
|
||||
|
||||
/* Return the public key with the key id KEYID and store it at PK. */
|
||||
int get_pubkey (ctrl_t ctrl, PKT_public_key *pk, u32 *keyid);
|
||||
|
||||
|
@ -291,6 +295,10 @@ int get_pubkey (ctrl_t ctrl, PKT_public_key *pk, u32 *keyid);
|
|||
also only considers primary keys. */
|
||||
int get_pubkey_fast (PKT_public_key *pk, u32 *keyid);
|
||||
|
||||
/* Return the entire keyblock used to create SIG. This is a
|
||||
* specialized version of get_pubkeyblock. */
|
||||
kbnode_t get_pubkeyblock_for_sig (ctrl_t ctrl, PKT_signature *sig);
|
||||
|
||||
/* Return the key block for the key with KEYID. */
|
||||
kbnode_t get_pubkeyblock (ctrl_t ctrl, u32 *keyid);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue