diff options
author | Werner Koch <[email protected]> | 2018-04-12 07:17:27 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2018-04-12 07:17:27 +0000 |
commit | f7700a016926f0d8e9cb3c0337837deb7fe01079 (patch) | |
tree | cd622990455db03ba7b67cd1f1acd192eb38463c /src/gpgme.c | |
parent | qt: Add test for resetting config value (diff) | |
download | gpgme-f7700a016926f0d8e9cb3c0337837deb7fe01079.tar.gz gpgme-f7700a016926f0d8e9cb3c0337837deb7fe01079.zip |
core: Add new context flag "no-symkey-cache".
* src/gpgme.c (gpgme_set_ctx_flag): Set flag.
(gpgme_get_ctx_flag): Get flag.
* src/context.h (struct gpgme_context): Add field no_symkey_cache.
* src/engine-gpg.c (struct engine_gpg): Ditto.
(gpg_set_engine_flags): Set flag.
(build_argv): Pass option --no-symkey-cache to gpg.
* tests/run-decrypt.c (print_result): Fix segv for symmetric messages.
(main): New option --no-symkey-cache.
* tests/run-encrypt.c (main): New option --no-symkey-cache.
Signed-off-by: Werner Koch <[email protected]>
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 9e65c50a..82d67478 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -538,6 +538,10 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx->request_origin) err = gpg_error_from_syserror (); } + else if (!strcmp (name, "no-symkey-cache")) + { + ctx->no_symkey_cache = abool; + } else err = gpg_error (GPG_ERR_UNKNOWN_NAME); @@ -583,6 +587,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) { return ctx->request_origin? ctx->request_origin : ""; } + else if (!strcmp (name, "no-symkey-cache")) + { + return ctx->no_symkey_cache? "1":""; + } else return NULL; } |