aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-08-31 10:02:02 +0000
committerWerner Koch <[email protected]>2023-08-31 10:02:02 +0000
commitd75b2a91517397261c2508dba058611f803c0733 (patch)
tree380b1f0e36039b170deb559f18dafbde737ab60f /tests
parentqt: Allow specifying user IDs to use when refreshing keys via WKD (diff)
downloadgpgme-d75b2a91517397261c2508dba058611f803c0733.tar.gz
gpgme-d75b2a91517397261c2508dba058611f803c0733.zip
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
Diffstat (limited to 'tests')
-rw-r--r--tests/run-encrypt.c8
1 files changed, 7 insertions, 1 deletions
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;