From 3580bb139b2e41f6c2397e506ee66f4892ceec62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ingo=20Kl=C3=B6cker?= Date: Thu, 26 Jan 2023 09:52:11 +0100 Subject: [PATCH] core: Update required GnuPG version for new archive features * src/engine-gpg.c (gpg_decrypt, gpg_encrypt, gpg_encrypt_sign, gpg_sign, gpg_verify): Require gpg 2.4.1. -- To work properly the archive feature needs a fix added in GnuPG 2.4.1. GnuPG-bug-id: 6342 --- doc/gpgme.texi | 11 +++++++---- src/engine-gpg.c | 10 +++++----- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/doc/gpgme.texi b/doc/gpgme.texi index d7c38f82..22377088 100644 --- a/doc/gpgme.texi +++ b/doc/gpgme.texi @@ -5643,7 +5643,8 @@ shall exactly act as @code{gpgme_op_decrypt_verify}. The @code{GPGME_DECRYPT_ARCHIVE} symbol specifies that the input is an encrypted archive that shall be decrypted and extracted. This feature -is currently only supported for the OpenPGP crypto engine. +is currently only supported for the OpenPGP crypto engine and requires +GnuPG 2.4.1. @item GPGME_DECRYPT_UNWRAP @since{1.8.0} @@ -5851,7 +5852,8 @@ multiple of the following bit values: The @code{GPGME_VERIFY_ARCHIVE} symbol specifies that the input is a signed archive that shall be verified and extracted. This feature -is currently only supported for the OpenPGP crypto engine. +is currently only supported for the OpenPGP crypto engine and requires +GnuPG 2.4.1. @end table @@ -6315,7 +6317,8 @@ mode settings of the context are ignored. @since{1.19.0} A signed archive is created from the given files and directories. This -feature is currently only supported for the OpenPGP crypto engine. +feature is currently only supported for the OpenPGP crypto engine and requires +GnuPG 2.4.1. @end table @end deftp @@ -6594,7 +6597,7 @@ supported for the OpenPGP crypto engine. The @code{GPGME_ENCRYPT_ARCHIVE} symbol specifies that the input is a NUL-separated list of file paths and directory paths that shall be encrypted into an archive. This feature is currently only supported -for the OpenPGP crypto engine. +for the OpenPGP crypto engine and requires GnuPG 2.4.1. @end table diff --git a/src/engine-gpg.c b/src/engine-gpg.c index 2f63d6ff..e921df0a 100644 --- a/src/engine-gpg.c +++ b/src/engine-gpg.c @@ -1832,7 +1832,7 @@ gpg_decrypt (void *engine, gpg->flags.use_gpgtar = !!(flags & GPGME_DECRYPT_ARCHIVE); - if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.3.5")) + if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.4.1")) return gpg_error (GPG_ERR_NOT_SUPPORTED); if (gpg->flags.use_gpgtar && (flags & GPGME_DECRYPT_UNWRAP)) @@ -2334,7 +2334,7 @@ gpg_encrypt (void *engine, gpgme_key_t recp[], const char *recpstring, gpg->flags.use_gpgtar = !!(flags & GPGME_ENCRYPT_ARCHIVE); - if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.3.5")) + if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.4.1")) return gpg_error (GPG_ERR_NOT_SUPPORTED); if (gpg->flags.use_gpgtar && (flags & GPGME_ENCRYPT_WRAP)) @@ -2449,7 +2449,7 @@ gpg_encrypt_sign (void *engine, gpgme_key_t recp[], gpg->flags.use_gpgtar = !!(flags & GPGME_ENCRYPT_ARCHIVE); - if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.3.5")) + if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.4.1")) return gpg_error (GPG_ERR_NOT_SUPPORTED); if (recp || recpstring) @@ -3590,7 +3590,7 @@ gpg_sign (void *engine, gpgme_data_t in, gpgme_data_t out, gpg->flags.use_gpgtar = mode == GPGME_SIG_MODE_ARCHIVE; - if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.3.5")) + if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.4.1")) return gpg_error (GPG_ERR_NOT_SUPPORTED); if (mode == GPGME_SIG_MODE_CLEAR) @@ -3674,7 +3674,7 @@ gpg_verify (void *engine, gpgme_verify_flags_t flags, gpgme_data_t sig, gpg->flags.use_gpgtar = !!(flags & GPGME_VERIFY_ARCHIVE); - if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.3.5")) + if (gpg->flags.use_gpgtar && !have_gpg_version (gpg, "2.4.1")) return gpg_error (GPG_ERR_NOT_SUPPORTED); err = append_args_from_sender (gpg, ctx);