diff options
author | Ingo Klöcker <[email protected]> | 2022-11-04 09:21:25 +0000 |
---|---|---|
committer | Ingo Klöcker <[email protected]> | 2022-11-04 09:38:41 +0000 |
commit | 4f874ea431ba68ba70cf569741488502b1f61e66 (patch) | |
tree | 9b17d35addc0d86ecbb60bbf51a9004932de34b6 /src/gpgme.c | |
parent | build: Update libassuan.m4. (diff) | |
download | gpgme-4f874ea431ba68ba70cf569741488502b1f61e66.tar.gz gpgme-4f874ea431ba68ba70cf569741488502b1f61e66.zip |
core: New context flag "no-auto-check-trustdb"
* src/context.h (gpgme_context): Add field no_auto_check_trustdb.
* src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add flag
"no-auto-check-trustdb".
* src/engine-gpg.c (engine_gpg): Add flags.no_auto_check_trustdb.
(gpg_set_engine_flags): Set the flag.
(build_argv): Pass option to gpg.
* tests/run-keylist.c (show_usage, main): Add option --no-trust-check.
--
This makes the --no-auto-check-trustdb option available in the GPGME API
to disable the potentially expensive automatic trust database check.
GnuPG-bug-id: 6261
Diffstat (limited to 'src/gpgme.c')
-rw-r--r-- | src/gpgme.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpgme.c b/src/gpgme.c index ed15912a..135a75a7 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -607,6 +607,10 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx->import_filter) err = gpg_error_from_syserror (); } + else if (!strcmp (name, "no-auto-check-trustdb")) + { + ctx->no_auto_check_trustdb = abool; + } else err = gpg_error (GPG_ERR_UNKNOWN_NAME); @@ -688,6 +692,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) { return ctx->import_filter? ctx->import_filter : ""; } + else if (!strcmp (name, "no-auto-check-trustdb")) + { + return ctx->no_auto_check_trustdb? "1":""; + } else return NULL; } |