gpgme/tests
Ingo Klöcker 5d8316da1d
core: Support usage of gpgtar for encryption
* src/gpgme.h.in (GPGME_ENCRYPT_ARCHIVE): New encryption flag.
* src/engine-gpg.c (arg_and_data_s): New field gpg_arg.
(engine_gpg): New flag use_gpgtar.
(_add_arg): Add argument gpg_arg and set it.
(add_arg_ext, add_arg_with_locp, add_arg, add_arg_pfx, add_arg_len):
Adjust call of _add_arg.
(add_arg_with_locp): Add argument front.
(add_gpg_arg, add_gpg_arg_with_value): New.
(gpg_new): Use add_gpg_arg_with_value for gpg-only options with a value
and add_gpg_arg for gpg-only options without.
(build_argv): Consider usage of gpgtar when counting arguments to pass
to gpg/gpgtar. Prepend "--gpg-args" to all gpg-only arguments if gpgtar
is used.
(start): Set program to use. Read diagnostics output from stderr when
using gpgtar. Do not pass --status-fd to gpgtar for gpg < 2.4.1. Use
add_gpg_arg_with_value for --lc-ctype and --lc-messages.
(gpg_encrypt): Set use_gpgtar engine flag if GPGME_ENCRYPT_ARCHIVE flag
is set. Check for new enough gpg and incompatible flags. Use
add_gpg_arg_with_value for gpg-only options with a value and
add_gpg_arg for gpg-only options without a value. Set extra options
for gpgtar and pass input data to stdin when using gpgtar.
* src/engine-gpgsm.c (gpgsm_encrypt): Return error if new flag is set.
* src/engine-uiserver.c (uiserver_encrypt): Ditto.

* tests/run-encrypt.c (show_usage): New options --archive and
--diagnostics.
(main): Parse new options. Encrypt with gpgtar if --archive is given.
Print stderr of gpg/gpgtar if --diagnostics is given.
--

With this change the gpgme_op_encrypt* functions get support for
encrypting a list of files and/or directories passed as NUL-separated
list in "plain" data with gpgtar.

GnuPG-bug-id: 6342
2023-01-18 11:48:02 +01:00
..
gpg tests: Make t-edit-sign more robust. 2022-08-10 12:34:12 +02:00
gpgsm tests: Add ECC key generation for tests/gpgsm. 2020-03-27 19:50:24 +09:00
json tests: Fix gcc incompatibility 2020-10-03 19:54:00 +02:00
opassuan core: Fully implement the inquire callback for assuan_transact 2020-09-09 12:13:20 +02: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 Revert "tests: Avoid problems with local time across a day boundary." 2022-06-09 15:43:24 +02:00
run-decrypt.c core: New data flags "io-buffer-size" and "sensitive". 2021-06-14 19:51:28 +02:00
run-encrypt.c core: Support usage of gpgtar for encryption 2023-01-18 11:48:02 +01:00
run-export.c core: Add new option --secret-subkey to help texts. 2022-01-04 12:30:22 +01:00
run-genkey.c tests: Fix generation of keys without expiration 2022-01-13 16:30:56 +01:00
run-identify.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
run-import.c core: Allow setting import filters when importing keys 2021-12-14 15:44:37 +01:00
run-keylist.c core: New context flag "no-auto-check-trustdb" 2022-11-04 10:38:41 +01:00
run-keysign.c core: New flag GPGME_KEYSIGN_FORCE. 2021-03-11 11:49:07 +01:00
run-receive-keys.c core: New function gpgme_op_receive_keys 2022-02-03 15:56:30 +01:00
run-sign.c tests: Add support for clear text signatures to test runner 2022-06-14 10:10:57 +02:00
run-support.h Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
run-swdb.c tests: Remove unsupported option --status from usage help 2022-01-13 15:23:43 +01:00
run-threaded.c core: Detect bad passphrase error on certificate import 2021-12-22 15:25:42 +01:00
run-tofu.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
run-verify.c core: Allow for older compilers. 2021-05-12 08:50:04 +02:00
start-stop-agent build: Fix make distcheck problem. 2021-08-27 14:13:36 +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 Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00
t-engine-info.c core: Extend gpgme_get_dirinfo to return the gpgtar name 2023-01-18 10:30:17 +01:00
t-version.c Add SPDX identifiers to most source files 2018-11-16 13:27:33 +01:00