summaryrefslogtreecommitdiffstats
path: root/crypt.c
diff options
context:
space:
mode:
authorKevin McCarthy <kevin@8t8.us>2015-03-30 15:45:55 -0700
committerKevin McCarthy <kevin@8t8.us>2015-03-30 15:45:55 -0700
commit15b615710556a2f0960b580d0961421fe5561ce4 (patch)
tree507101abf559c8f6fcb2ae9afbed11f688d23126 /crypt.c
parent1d72a322101d00f3962e4d0b5d72e871c5afe755 (diff)
Add a security bit to the message for oppenc mode.
This allows oppenc to be enabled/disabled on a message level. If something initially enables encryption, such as crypt_autoencrypt or crypt_replyencrypt, oppenc is turned off for the message. Change the postpone/resume code to persist the oppenc bit. Also change resend message to enable and invoke oppenc if the option is set.
Diffstat (limited to 'crypt.c')
-rw-r--r--crypt.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/crypt.c b/crypt.c
index c3bba973..dc7a669b 100644
--- a/crypt.c
+++ b/crypt.c
@@ -773,8 +773,7 @@ void crypt_opportunistic_encrypt(HEADER *msg)
if (!WithCrypto)
return;
- /* crypt_autoencrypt should override crypt_opportunistic_encrypt */
- if (option (OPTCRYPTAUTOENCRYPT))
+ if (! (option (OPTCRYPTOPPORTUNISTICENCRYPT) && (msg->security & OPPENCRYPT)) )
return;
crypt_get_keys (msg, &pgpkeylist, 1);