summaryrefslogtreecommitdiffstats
path: root/g10/keydb.h
diff options
context:
space:
mode:
authorWerner Koch <wk@gnupg.org>2019-07-04 10:42:48 +0200
committerWerner Koch <wk@gnupg.org>2019-07-04 10:42:48 +0200
commit9980f81da765f88a65604ab083563bf15ccdb425 (patch)
treef38f4a030de35bedcbda0c7983216622125e4444 /g10/keydb.h
parentdirmngr: Avoid endless loop in case of HTTP error 503. (diff)
downloadgnupg2-9980f81da765f88a65604ab083563bf15ccdb425.tar.xz
gnupg2-9980f81da765f88a65604ab083563bf15ccdb425.zip
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>
Diffstat (limited to 'g10/keydb.h')
-rw-r--r--g10/keydb.h13
1 files changed, 11 insertions, 2 deletions
diff --git a/g10/keydb.h b/g10/keydb.h
index 54c1f6823..19d2523e0 100644
--- a/g10/keydb.h
+++ b/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. */