aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/gpgme.c b/src/gpgme.c
index 2d829d9b..3d72f695 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -250,6 +250,7 @@ gpgme_release (gpgme_ctx_t ctx)
free (ctx->override_session_key);
free (ctx->request_origin);
free (ctx->auto_key_locate);
+ free (ctx->trust_model);
_gpgme_engine_info_release (ctx->engine_info);
ctx->engine_info = NULL;
DESTROY_LOCK (ctx->lock);
@@ -554,6 +555,13 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value)
if (!ctx->auto_key_locate)
err = gpg_error_from_syserror ();
}
+ else if (!strcmp (name, "trust-model"))
+ {
+ free (ctx->trust_model);
+ ctx->trust_model = strdup (value);
+ if (!ctx->trust_model)
+ err = gpg_error_from_syserror ();
+ }
else
err = gpg_error (GPG_ERR_UNKNOWN_NAME);