diff options
Diffstat (limited to 'g10/keydb.h')
-rw-r--r-- | g10/keydb.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/g10/keydb.h b/g10/keydb.h index 556b53726..66bfa57c0 100644 --- a/g10/keydb.h +++ b/g10/keydb.h @@ -485,6 +485,29 @@ int get_pubkey_fast ( PKT_public_key *pk, u32 *keyid ); using merge_selfsigs. */ KBNODE get_pubkeyblock( u32 *keyid ); +/* A list used by get_pubkeys to gather all of the matches. */ +struct pubkey +{ + struct pubkey *next; + /* The key to use (either the public key or the subkey). */ + PKT_public_key *pk; + kbnode_t keyblock; +}; + +/* Free a single key. This does not remove key from any list! */ +void pubkey_free (struct pubkey *key); + +/* Free a list of public keys. */ +void pubkeys_free (struct pubkey *keys); + +/* Returns all keys that match the search specfication SEARCH_TERMS. + The returned keys should be freed using pubkeys_free. */ +gpg_error_t +get_pubkeys (ctrl_t ctrl, + char *search_terms, int use, int include_unusable, char *source, + int warn_possibly_ambiguous, + struct pubkey **keys); + /* Find a public key identified by the name NAME. If name appears to be a valid valid RFC822 mailbox (i.e., email |