aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/gpgme.c b/src/gpgme.c
index 6a5232e1..2c5b51ea 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -782,6 +782,10 @@ gpgme_set_keylist_mode (gpgme_ctx_t ctx, gpgme_keylist_mode_t mode)
if (!ctx)
return gpg_error (GPG_ERR_INV_VALUE);
+ if ((mode & GPGME_KEYLIST_MODE_LOCATE_EXTERNAL) ==
+ (GPGME_KEYLIST_MODE_LOCAL|GPGME_KEYLIST_MODE_FORCE_EXTERN))
+ return gpg_error (GPG_ERR_INV_VALUE);
+
ctx->keylist_mode = mode;
return 0;
}