1
0
Fork 0
mirror of git://git.gnupg.org/gnupg.git synced 2025-07-02 22:46:30 +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>
(cherry picked from commit 9980f81da7)
This commit is contained in:
Werner Koch 2019-07-04 10:42:48 +02:00
parent d2e8d71251
commit 1187143343
No known key found for this signature in database
GPG key ID: E3FDFF218E45B72B
6 changed files with 57 additions and 32 deletions

View file

@ -2161,10 +2161,10 @@ export_ssh_key (ctrl_t ctrl, const char *userid)
{
getkey_ctx_t getkeyctx;
err = get_pubkey_byname (ctrl, &getkeyctx, NULL, userid, &keyblock,
err = get_pubkey_byname (ctrl, GET_PUBKEY_NO_AKL,
&getkeyctx, NULL, userid, &keyblock,
NULL,
0 /* Only usable keys or given exact. */,
1 /* No AKL lookup. */);
0 /* Only usable keys or given exact. */);
if (!err)
{
err = getkey_next (ctrl, getkeyctx, NULL, NULL);