From b8159eadb5636cd9d93ee60c41e75d5978927870 Mon Sep 17 00:00:00 2001
From: Werner Koch <wk@gnupg.org>
Date: Tue, 25 Oct 2016 17:27:49 +0200
Subject: core: New API functions gpgme_set_sender, gpgme_get_sender.

* src/context.h (struct gpgme_context): Add field 'sender'.
* src/gpgme.c: Include mbox-util.h.
(gpgme_release): Free SENDER.
(gpgme_set_sender): New.
(gpgme_get_sender): New.
* src/gpgme.def, src/libgpgme.vers: Add new functions.

* src/engine-gpg.c (append_args_from_sender): New.
(gpg_encrypt_sign, gpg_sign): Call append_args_from_sender.
(gpg_verify): Add arg CTX.  Call append_args_from_sender/
* src/engine-gpgsm.c (gpgsm_verify): Add dummy arg CTX.
* src/engine-uiserver.c (uiserver_verify): Ditto.
* src/engine.c (_gpgme_engine_op_verify): Add arg CTX.
* src/verify.c (verify_start): Pass CTX to engine function.

* tests/gpg/t-verify.c (main): Add some checks for new functions.
* tests/run-sign.c (main): Add option --sender.
* tests/run-verify.c (main): Ditto.

Signed-off-by: Werner Koch <wk@gnupg.org>
---
 src/gpgme.def | 3 +++
 1 file changed, 3 insertions(+)

(limited to 'src/gpgme.def')

diff --git a/src/gpgme.def b/src/gpgme.def
index c94c9607..d633df57 100644
--- a/src/gpgme.def
+++ b/src/gpgme.def
@@ -246,5 +246,8 @@ EXPORTS
 
     gpgme_addrspec_from_uid               @186
 
+    gpgme_set_sender                      @187
+    gpgme_get_sender                      @188
+
 ; END
 
-- 
cgit v1.2.3

