From 0224408c6332648461bdbba562f1a61c947c8ed3 Mon Sep 17 00:00:00 2001 From: Andre Heinecke Date: Tue, 29 Oct 2019 16:11:54 +0100 Subject: core: Add cert-notation support and extended-edit * src/context.h (gpgme_context): Add new flag for extended-edit. * src/engine-gpg.c (append_args_from_sig_notations): Add flags to control the kind of notations. (gpg_edit): Respect extended-edit and notations. (gpg_encrypt_sign, gpg_sign): Update call to append_args_from_sig_notations. * src/gpgme.c (gpgme_set_ctx_flag, gpgme_get_ctx_flag): Support extended-edit. * NEWS, doc/gpgme.texi: Mention extended-edit. -- This provides a way to get the extended key-edit interface without breaking bad state machines that rely on the current command flow. A use case for this is to enable multiple local signatures, which can be used together with annotations for: GnuPG-Bug-Id: T4734 --- src/gpgme.c | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'src/gpgme.c') diff --git a/src/gpgme.c b/src/gpgme.c index 65a2e309..8f4d5f3e 100644 --- a/src/gpgme.c +++ b/src/gpgme.c @@ -566,6 +566,10 @@ gpgme_set_ctx_flag (gpgme_ctx_t ctx, const char *name, const char *value) if (!ctx->trust_model) err = gpg_error_from_syserror (); } + else if (!strcmp (name, "extended-edit")) + { + ctx->extended_edit = abool; + } else err = gpg_error (GPG_ERR_UNKNOWN_NAME); @@ -623,6 +627,10 @@ gpgme_get_ctx_flag (gpgme_ctx_t ctx, const char *name) { return ctx->auto_key_locate? ctx->auto_key_locate : ""; } + else if (!strcmp (name, "extended-edit")) + { + return ctx->extended_edit ? "1":""; + } else return NULL; } -- cgit v1.2.3