summaryrefslogtreecommitdiffstats
path: root/crypt-gpgme.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2020-01-14 14:48:24 -0800
committerKevin McCarthy <kevin@8t8.us>2020-01-14 14:48:24 -0800
commit427d472da7c84e813a9381f629969c4bc6005dff (patch)
tree1c36e9e8866ff8a62c3c29e692222cbd24fb1a2c /crypt-gpgme.c
parent6470663e9da7c105b4f9bb62a250460de659478d (diff)
Add $crypt_opportunistic_encrypt_strong_keys config var.
When set, this modifies $crypt_opportunistic_encrypt to only search for "strong" keys (fully valid keys according to the web of trust). S/MIME behavior depends on the backend.
Diffstat (limited to 'crypt-gpgme.c')
-rw-r--r--crypt-gpgme.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/crypt-gpgme.c b/crypt-gpgme.c
index 35441d2c..488ac665 100644
--- a/crypt-gpgme.c
+++ b/crypt-gpgme.c
@@ -4769,7 +4769,8 @@ static crypt_key_t *crypt_getkeybyaddr (ADDRESS * a, short abilities,
{
if (the_strong_valid_key)
k = crypt_copy_key (the_strong_valid_key);
- else if (a_valid_addrmatch_key)
+ else if (a_valid_addrmatch_key &&
+ !option (OPTCRYPTOPPENCSTRONGKEYS))
k = crypt_copy_key (a_valid_addrmatch_key);
else
k = NULL;