core: New API functions gpgme_set_sender, gpgme_get_sender.
authorWerner Koch <wk@gnupg.org>
Tue, 25 Oct 2016 15:27:49 +0000 (17:27 +0200)
committerWerner Koch <wk@gnupg.org>
Tue, 25 Oct 2016 15:28:01 +0000 (17:28 +0200)
commitb8159eadb5636cd9d93ee60c41e75d5978927870
tree5b9c857eba89d45fca40f136abb85d95d15f70ee
parent26cbba3c9cb04a68b95f3a6000ac9bd93fe76dd7
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>
17 files changed:
NEWS
doc/gpgme.texi
src/context.h
src/engine-backend.h
src/engine-gpg.c
src/engine-gpgsm.c
src/engine-uiserver.c
src/engine.c
src/engine.h
src/gpgme.c
src/gpgme.def
src/gpgme.h.in
src/libgpgme.vers
src/verify.c
tests/gpg/t-verify.c
tests/run-sign.c
tests/run-verify.c