mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Improve keydb handling in the main import function.
* g10/getkey.c (get_pubkey_byfprint_fast): Factor most code out to ... (get_keyblock_byfprint_fast): .. new function. * g10/import.c (revocation_present): s/int rc/gpg_error_t err/. (import_one): Use get_keyblock_byfprint_fast to get the keyblock and a handle. Remove the now surplus keyblock fetch in the merge branch. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
752cae6dd2
commit
8448347b5b
3 changed files with 94 additions and 59 deletions
13
g10/keydb.h
13
g10/keydb.h
|
@ -339,8 +339,17 @@ int get_pubkey_byfprint (ctrl_t ctrl, PKT_public_key *pk, kbnode_t *r_keyblock,
|
|||
/* This function is similar to get_pubkey_byfprint, but it doesn't
|
||||
merge the self-signed data into the public key and subkeys or into
|
||||
the user ids. */
|
||||
int get_pubkey_byfprint_fast (PKT_public_key *pk,
|
||||
const byte *fprint, size_t fprint_len);
|
||||
gpg_error_t get_pubkey_byfprint_fast (PKT_public_key *pk,
|
||||
const byte *fprint, size_t fprint_len);
|
||||
|
||||
/* This function is similar to get_pubkey_byfprint, but it doesn't
|
||||
merge the self-signed data into the public key and subkeys or into
|
||||
the user ids. */
|
||||
gpg_error_t get_keyblock_byfprint_fast (kbnode_t *r_keyblock,
|
||||
KEYDB_HANDLE *r_hd,
|
||||
const byte *fprint, size_t fprint_len,
|
||||
int lock);
|
||||
|
||||
|
||||
/* Returns true if a secret key is available for the public key with
|
||||
key id KEYID. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue