summaryrefslogtreecommitdiffstats
path: root/g10/gpgcompose.c
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/gpgcompose.c
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/gpgcompose.c')
-rw-r--r--g10/gpgcompose.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/g10/gpgcompose.c b/g10/gpgcompose.c
index 9e6d51a57..7b7e1dc9a 100644
--- a/g10/gpgcompose.c
+++ b/g10/gpgcompose.c
@@ -1200,7 +1200,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));
@@ -2457,7 +2458,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));