mirror of
git://git.gnupg.org/gnupg.git
synced 2025-07-03 22:56:33 +02:00
gpg: Make the get_pubkey_byname interface easier to understand.
* g10/keydb.h (enum get_pubkey_modes): New. * g10/getkey.c (get_pubkey_byname): Repalce no_akl by a mode arg and change all callers. -- This change prepares the implementation of GET_PUBKEY_NO_LOCAL. Signed-off-by: Werner Koch <wk@gnupg.org>
This commit is contained in:
parent
8b113bb148
commit
9980f81da7
6 changed files with 57 additions and 32 deletions
13
g10/keydb.h
13
g10/keydb.h
|
@ -345,12 +345,21 @@ typedef struct pubkey_s *pubkey_t;
|
|||
/* Free a list of public keys. */
|
||||
void pubkeys_free (pubkey_t keys);
|
||||
|
||||
|
||||
/* Mode flags for get_pubkey_byname. */
|
||||
enum get_pubkey_modes
|
||||
{
|
||||
GET_PUBKEY_NORMAL = 0,
|
||||
GET_PUBKEY_NO_AKL = 1,
|
||||
GET_PUBKEY_NO_LOCAL = 2
|
||||
};
|
||||
|
||||
/* Find a public key identified by NAME. */
|
||||
int get_pubkey_byname (ctrl_t ctrl,
|
||||
int get_pubkey_byname (ctrl_t ctrl, enum get_pubkey_modes mode,
|
||||
GETKEY_CTX *retctx, PKT_public_key *pk,
|
||||
const char *name,
|
||||
KBNODE *ret_keyblock, KEYDB_HANDLE *ret_kdbhd,
|
||||
int include_unusable, int no_akl );
|
||||
int include_unusable);
|
||||
|
||||
/* Likewise, but only return the best match if NAME resembles a mail
|
||||
* address. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue