core: New gpgme_set_ctx_flag "request-origin".
authorWerner Koch <wk@gnupg.org>
Fri, 23 Mar 2018 14:27:32 +0000 (15:27 +0100)
committerWerner Koch <wk@gnupg.org>
Fri, 23 Mar 2018 14:27:32 +0000 (15:27 +0100)
commitb9000bc293164ff62efa7e91e5cf6d5fc19d482f
treea664a1e81aa8041a86b2ae931255119d4af99089
parenteee68c1b13fbe21c123f469712817e0c81f16383
core: New gpgme_set_ctx_flag "request-origin".

* src/context.h (gpgme_context): Add 'request_origin'.
* src/gpgme.c (gpgme_release): Free that field.
(gpgme_set_ctx_flag, gpgme_get_ctx_flag): Add "request-origin".
* src/engine-backend.h (engine_ops): Add 'set_engine_ops' func ptr and
adjust all users.
* src/engine.c (_gpgme_engine_set_engine_flags): New.
* src/op-support.c (_gpgme_op_reset): Call that func.
* src/engine-gpg.c (struct engine_gpg): Add 'request_origin'.
(gpg_set_engine_flags): New.
(_gpgme_engine_ops_gpg): Hook it.
(build_argv): Use command line option --request-origin.
* src/engine-gpgsm.c (struct engine_gpgsm): Add 'request_origin'.
(gpgsm_set_engine_flags): New.
(_gpgme_engine_ops_gpgsm): Hook it.
(start): Send OPTION "request-origin".
* src/engine-assuan.c (struct engine_llass): Add 'request_origin'.
(gpgsm_set_engine_flags): New.
(_gpgme_engine_ops_assuan): Hook it.
(start): Send OPTION "pretend-request-origin".

Signed-off-by: Werner Koch <wk@gnupg.org>
15 files changed:
doc/gpgme.texi
src/context.h
src/engine-assuan.c
src/engine-backend.h
src/engine-g13.c
src/engine-gpg.c
src/engine-gpgconf.c
src/engine-gpgsm.c
src/engine-spawn.c
src/engine-uiserver.c
src/engine.c
src/engine.h
src/gpgme.c
src/op-support.c
tests/run-decrypt.c