Home GnuPG
Diffusion GPGME 29cfcd316d1b

core: Support usage of gpgtar for creating an encrypted signed archive

Description

core: Support usage of gpgtar for creating an encrypted signed archive

* src/engine-gpg.c (gpg_encrypt_sign): Set use_gpgtar engine flag if
GPGME_ENCRYPT_ARCHIVE mode is set. Check for new enough gpg. 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.
* tests/run-encrypt.c (print_result): Rename to print_encrypt_result.
Print header.
(print_sign_result): New.
(show_usage): New option --sign.
(main): Parse new option. Sign and encrypt --sign is given.
Print results of signing additionally to results of encryption.

With this change the gpgme_op_encrypt_sign* functions get support for
creating an encrypted and signed archive from files and/or directories
passed as NUL-separated list in the "plain" data with gpgtar.

Details

Provenance
ikloeckerAuthored on Jan 19 2023, 11:08 AM
Parents
rM0ca45e48b45a: core: Support usage of gpgtar for creating a signed archive
Branches
Unknown
Tags
Unknown
Tasks
T6342: GPGME/Kleopatra: Extend gpgme to use gpgtar