From d75b2a91517397261c2508dba058611f803c0733 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 31 Aug 2023 12:02:02 +0200 Subject: Support GPGME_ENCRYPT_ALWAYS_TRUST also for S/MIME. * src/engine-gpgsm.c (gpgsm_encrypt): Send the always-trust options. * tests/run-encrypt.c: Add option --always-trust. -- Note that the run-encrypt test tool used to assume always-trust for OpenPGP since 1.7.0 This bug has also been fixed by introducing the explicit option. GnuPG-bug-id: 6559 --- tests/run-encrypt.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'tests/run-encrypt.c') diff --git a/tests/run-encrypt.c b/tests/run-encrypt.c index 94a66283..80c40729 100644 --- a/tests/run-encrypt.c +++ b/tests/run-encrypt.c @@ -147,6 +147,7 @@ show_usage (int ex) " --key NAME encrypt to key NAME\n" " --keystring NAMES encrypt to ';' delimited NAMES\n" " --throw-keyids use this option\n" + " --always-trust use this option\n" " --no-symkey-cache disable the use of that cache\n" " --wrap assume input is valid OpenPGP message\n" " --symmetric encrypt symmetric (OpenPGP only)\n" @@ -180,7 +181,7 @@ main (int argc, char **argv) const char *directory = NULL; const char *output = NULL; int i; - gpgme_encrypt_flags_t flags = GPGME_ENCRYPT_ALWAYS_TRUST; + gpgme_encrypt_flags_t flags = 0; gpgme_off_t offset; int no_symkey_cache = 0; int diagnostics = 0; @@ -263,6 +264,11 @@ main (int argc, char **argv) flags |= GPGME_ENCRYPT_THROW_KEYIDS; argc--; argv++; } + else if (!strcmp (*argv, "--always-trust")) + { + flags |= GPGME_ENCRYPT_ALWAYS_TRUST; + argc--; argv++; + } else if (!strcmp (*argv, "--wrap")) { flags |= GPGME_ENCRYPT_WRAP; -- cgit v1.2.3