gpgme/tests
Werner Koch 7659d42468
core: Implement context flag "override-session-key".
* src/gpgme.c (gpgme_set_ctx_flag): Add flags "export-session-key" and
"override-session-key".
(gpgme_get_ctx_flag): Ditto.
(gpgme_set_export_session_keys): Remove.
(gpgme_get_export_session_keys): Remove.
* src/gpgme.def, src/libgpgme.vers: Remove them.
* src/context.h (struct gpgme_context): Add field
override_session_key.
* src/decrypt-verify.c (decrypt_verify_start): Pass
override_session_key value to the engine.
* src/decrypt.c (decrypt_start): Ditto.
* src/engine.c (_gpgme_engine_op_decrypt): Ditto.
(_gpgme_engine_op_decrypt_verify): Ditto.
* src/engine-backend.h (struct engine_ops): Extend DECRYPT and
DECRYPT_VERIFY_START with override_session_key.
* src/engine-uiserver.c (_uiserver_decrypt): Add stub arg
override_session_key.
(uiserver_decrypt): Ditto.
(uiserver_decrypt_verify): Ditto.
* src/engine-gpgsm.c (gpgsm_decrypt): Ditto.
* src/engine-gpg.c (gpg_decrypt): Add arg override_session_key and set
corresponding gpg option.

* tests/run-decrypt.c (print_result): Print the session key if
available.
(main): Add options --export-session-key and --override-session-key.

--

To keep the number of context manipulation functions at bay, this
patches removes the just added gpgme_set_export_session_keys and
gpgme_get_export_session_keys by flags for the generic context
function.

The patch also implements the --override-session-key feature.

GnuPG-bug-id: 2754
Signed-off-by: Werner Koch <wk@gnupg.org>
2016-11-15 10:34:13 +01:00
..
gpg tests,python: Atomic directory creation 2016-11-11 09:09:40 +01:00
gpgsm tests,python: Atomic directory creation 2016-11-11 09:09:40 +01:00
opassuan tests: Mark lots of unused vars and fix const mismatches. 2016-09-13 20:48:06 +02:00
.gitignore .gitignore: flesh out rules and add subdirectory-.gitignores. 2012-04-20 16:05:11 +02:00
ChangeLog-2011 move some file encodings to UTF-8 2016-09-23 16:08:33 +02:00
Makefile.am core: Add gpgme_op_query_swdb and helper. 2016-11-03 17:32:30 +01:00
run-decrypt.c core: Implement context flag "override-session-key". 2016-11-15 10:34:13 +01:00
run-encrypt.c core: Make use of the "size-hint" in engine-gpg. 2016-08-12 15:32:31 +02:00
run-export.c Add an export secret key feature. 2015-08-24 12:41:24 +02:00
run-genkey.c core: New function gpgme_op_revuid. 2016-09-14 12:42:12 +02:00
run-identify.c tests: Add new test tool run-identify. 2016-06-21 16:18:00 +02:00
run-import.c Remove all trailing whitespace from source files 2012-09-25 15:29:49 +02:00
run-keylist.c core,cpp: Extend the TOFU information. 2016-09-07 09:26:11 +02:00
run-keysign.c core: New function gpgme_op_keysign. 2016-09-14 18:59:55 +02:00
run-sign.c core: New API functions gpgme_set_sender, gpgme_get_sender. 2016-10-25 17:28:01 +02:00
run-support.h tests: Use gpgme_io_write in passhrase callbacks. 2016-09-13 20:46:41 +02:00
run-swdb.c core: Add gpgme_op_query_swdb and helper. 2016-11-03 17:32:30 +01:00
run-tofu.c core: Add public function gpgme_get_ctx_flag. 2016-11-15 09:24:17 +01:00
run-verify.c core: New API functions gpgme_set_sender, gpgme_get_sender. 2016-10-25 17:28:01 +02:00
start-stop-agent Fix test suite for GnuPG 2.1 which uses pubring.kbx. 2015-06-08 10:43:29 +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 tests: Mark lots of unused vars and fix const mismatches. 2016-09-13 20:48:06 +02:00
t-engine-info.c core: Add new items for gpgme_get_dirinfo. 2016-08-22 16:57:51 +02:00
t-version.c Change the various version numbers to the new scheme. 2013-02-26 17:10:18 +01:00