aboutsummaryrefslogtreecommitdiffstats
path: root/src/gpgme.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpgme.c')
-rw-r--r--src/gpgme.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gpgme.c b/src/gpgme.c
index 2703cd72..6a5232e1 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -255,6 +255,7 @@ gpgme_release (gpgme_ctx_t ctx)
free (ctx->trust_model);
free (ctx->cert_expire);
free (ctx->key_origin);
+ free (ctx->import_filter);
_gpgme_engine_info_release (ctx->engine_info);
ctx->engine_info = NULL;
DESTROY_LOCK (ctx->lock);
@@ -594,6 +595,13 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value)
if (!ctx->key_origin)
err = gpg_error_from_syserror ();
}
+ else if (!strcmp (name, "import-filter"))
+ {
+ free (ctx->import_filter);
+ ctx->import_filter = strdup (value);
+ if (!ctx->import_filter)
+ err = gpg_error_from_syserror ();
+ }
else
err = gpg_error (GPG_ERR_UNKNOWN_NAME);
@@ -671,6 +679,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name)
{
return ctx->key_origin? ctx->key_origin : "";
}
+ else if (!strcmp (name, "import-filter"))
+ {
+ return ctx->import_filter? ctx->import_filter : "";
+ }
else
return NULL;
}