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 255d1165..2703cd72 100644
--- a/src/gpgme.c
+++ b/src/gpgme.c
@@ -254,6 +254,7 @@ gpgme_release (gpgme_ctx_t ctx)
free (ctx->auto_key_locate);
free (ctx->trust_model);
free (ctx->cert_expire);
+ free (ctx->key_origin);
_gpgme_engine_info_release (ctx->engine_info);
ctx->engine_info = NULL;
DESTROY_LOCK (ctx->lock);
@@ -586,6 +587,13 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value)
if (!ctx->cert_expire)
err = gpg_error_from_syserror ();
}
+ else if (!strcmp (name, "key-origin"))
+ {
+ free (ctx->key_origin);
+ ctx->key_origin = strdup (value);
+ if (!ctx->key_origin)
+ err = gpg_error_from_syserror ();
+ }
else
err = gpg_error (GPG_ERR_UNKNOWN_NAME);
@@ -659,6 +667,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name)
{
return ctx->cert_expire? ctx->cert_expire : "";
}
+ else if (!strcmp (name, "key-origin"))
+ {
+ return ctx->key_origin? ctx->key_origin : "";
+ }
else
return NULL;
}