gpgme/tests
Werner Koch a1f76b3b54
core: Add extended versions of the encrypt functions.
* src/gpgme.h.in (gpgme_op_encrypt_ext_start) New.
(gpgme_op_encrypt_ext): New.
(gpgme_op_encrypt_sign_ext_start): New.
(gpgme_op_encrypt_sign_ext): New.
* src/libgpgme.vers, tests/run-encrypt.c: Add them.

* src/encrypt.c (encrypt_start): Add arg recpstring.
(gpgme_op_encrypt): Factor code out to ...
(gpgme_op_encrypt_ext): new function with new arg recpstring.
(gpgme_op_encrypt_start): Factor code out to ...
(gpgme_op_encrypt_ext_start): new function with new arg recpstring.
* src/encrypt-sign.c (encrypt_sign_start): Add arg recpstring.
(gpgme_op_encrypt_sign): Factor code out to ...
(gpgme_op_encrypt_sign_ext): new function with new arg recpstring.
(gpgme_op_encrypt_sign_start): Factor code out to ...
(gpgme_op_encrypt_sign_ext_start): new function with new arg
recpstring.

* src/engine-backend.h (struct engine_ops): Change fields encrypt and
encrypt_sign.
* src/engine.c (_gpgme_engine_op_encrypt): Add arg recpstring and pass
to engine.
(_gpgme_engine_op_encrypt_sign): Ditto.
* src/engine-gpg.c (append_args_from_recipients_string): New.
(gpg_encrypt): Add arg recpstring and call new function as needed.
(gpg_encrypt_sign): Ditto.
* src/engine-gpgsm.c (set_recipients_from_string): New.
(gpgsm_encrypt): Add arg recpstring and call new function as needed.
* src/engine-uiserver.c (set_recipients_from_string): New.
(uiserver_encrypt): Add arg recpstring and call new function as
needed.

* tests/run-encrypt.c (xstrdup): New.
(main): Add option --keystring.

* src/gpgme-json.c (get_keys): Simplify.
(op_encrypt): Modify to make use of the extended encrypt function.

--

This new feature can be used to avoid the need for a key lookup and
thus several extra calls to the backend.

Note that run-test uses a semicolon as delimiter because that make
testing the feature on the command line much easier.

Signed-off-by: Werner Koch <wk@gnupg.org>
2018-04-17 08:45:00 +02:00
..
gpg core: Tweak STATUS_FAILURE handling. 2018-04-12 20:36:30 +02:00
gpgsm tests: Makefile portability. 2018-02-15 11:14:49 +09:00
opassuan doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
.gitignore .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
ChangeLog-2011 Spelling fixes for comments and doc 2017-12-08 05:59:11 +01:00
Makefile.am doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-decrypt.c core: Add new context flag "no-symkey-cache". 2018-04-12 09:17:27 +02:00
run-encrypt.c core: Add extended versions of the encrypt functions. 2018-04-17 08:45:00 +02:00
run-export.c doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-genkey.c core: New API gpgme_op_set_uid_flag. 2017-03-21 19:03:58 +01:00
run-identify.c core: Also check for a failed selftest in gpgm_data_new. 2017-12-04 12:08:31 +01:00
run-import.c doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-keylist.c tests: Print userid signatures in run-keylist 2017-12-07 13:47:18 +01:00
run-keysign.c doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-sign.c core: Add new context flag "redraw". 2017-01-31 09:44:29 +01:00
run-support.h core: Parse skipped_v3_keys 2018-03-15 16:23:18 +01:00
run-swdb.c doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-tofu.c doc: Replace http: by https: in core source files. 2016-11-16 13:27:00 +01:00
run-verify.c tests: Avoid segv in run-verify due to Policy URLs 2018-04-12 15:59:22 +02:00
start-stop-agent tests: Fix distcheck. 2017-07-13 16:06:27 +02:00
t-data-1.txt 2001-10-16 Marcus Brinkmann <marcus@g10code.de> 2001-10-17 19:17:46 +00:00
t-data-2.txt 2001-10-16 Marcus Brinkmann <marcus@g10code.de> 2001-10-17 19:17:46 +00:00
t-data.c core: Also check for a failed selftest in gpgm_data_new. 2017-12-04 12:08:31 +01:00
t-engine-info.c core: Extend gpgme_get_dirinfo to return the gpg-wks-client name. 2017-03-21 11:16:16 +01:00
t-version.c Change the various version numbers to the new scheme. 2013-02-26 17:10:18 +01:00