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>
(cherry picked from commit 9980f81da7
)
This commit is contained in:
parent
d2e8d71251
commit
1187143343
6 changed files with 57 additions and 32 deletions
|
@ -1199,7 +1199,8 @@ sig_revocation_key (const char *option, int argc, char *argv[], void *cookie)
|
|||
option, argv[0]);
|
||||
|
||||
pk.req_usage = PUBKEY_USAGE_SIG;
|
||||
err = get_pubkey_byname (NULL, NULL, &pk, argv[1], NULL, NULL, 1, 1);
|
||||
err = get_pubkey_byname (NULL, GET_PUBKEY_NO_AKL,
|
||||
NULL, &pk, argv[1], NULL, NULL, 1);
|
||||
if (err)
|
||||
log_fatal ("looking up key %s: %s\n", argv[1], gpg_strerror (err));
|
||||
|
||||
|
@ -2433,7 +2434,8 @@ pk_esk (const char *option, int argc, char *argv[], void *cookie)
|
|||
|
||||
memset (&pk, 0, sizeof (pk));
|
||||
pk.req_usage = PUBKEY_USAGE_ENC;
|
||||
err = get_pubkey_byname (NULL, NULL, &pk, pi.keyid, NULL, NULL, 1, 1);
|
||||
err = get_pubkey_byname (NULL, GET_PUBKEY_NO_AKL,
|
||||
NULL, &pk, pi.keyid, NULL, NULL, 1);
|
||||
if (err)
|
||||
log_fatal ("%s: looking up key %s: %s\n",
|
||||
option, pi.keyid, gpg_strerror (err));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue